Dod Weapon/Corpse Stay
by Wilson [29th ID] · 2007-01-14 · 22 replies · 19135 views · 253 downloads
From the first post
rn * Created by the 29th Infantry Division
rn * www.29th.org (A Realism Unit)
rn * www.dodrealism.branzone.com -- Revolutionizing Day of Defeat Realism
rn *
rn * DESCRIPTION
rn * Will allow a server-side control of how long weapons stay
rn * on the ground, and how long corpses stay on the ground.
rn * Warning: Having too many weapons/corpses will cause lag
rn * (This is done by very high settings of the CVARs)
rn *
rn * KNOWN BUGS
rn * If player dies in mid air, fake corpse will fall through the ground
rn *
rn * CVARs
rn * dod_weaponstay <-1/0/#>
rn * Setting to 0 will turn off Weaponstay
rn * Setting to -1 will force weapons to stay the entire round
rn * Setting above 0 will force weapons to stay for their normal period plus this #
rn *
rn * dod_corpsestay <-1/0/#>
rn * Setting to 0 will turn off Corpsestay
rn * Setting to -1 will force corpses to stay the entire round
rn * Setting above 0 will force corpses to stay this #
rn */
The thread
All 23 posts from 10 people on Dod Weapon/Corpse Stay, kept as they were written.
Threads: 57
Joined: Oct 2005
/* DOD WEAPON/CORPSE STAYrn * Created by the 29th Infantry Divisionrn * www.29th.org (A Realism Unit)rn * www.dodrealism.branzone.com -- Revolutionizing Day of Defeat Realismrn *rn * DESCRIPTIONrn * Will allow a server-side control of how long weapons stayrn * on the ground, and how long corpses stay on the ground.rn * Warning: Having too many weapons/corpses will cause lagrn * (This is done by very high settings of the CVARs)rn *rn * KNOWN BUGSrn * If player dies in mid air, fake corpse will fall through the groundrn *rn * CVARsrn * dod_weaponstay <-1/0/#>rn * Setting to 0 will turn off Weaponstayrn * Setting to -1 will force weapons to stay the entire roundrn * Setting above 0 will force weapons to stay for their normal period plus this #rn *rn * dod_corpsestay <-1/0/#>rn * Setting to 0 will turn off Corpsestayrn * Setting to -1 will force corpses to stay the entire roundrn * Setting above 0 will force corpses to stay this #rn */
Threads: 103
Joined: May 2005
ohh nice heheh i'll be trying this out probably monday (heh my day off so ill def be able to find time.. :p)
Threads: 10
Joined: Apr 2005
Nice...try it out on our linux boxy :)
Threads: 12
Joined: Jul 2006
Oh sweet! I'll be testing this out tonight!
Threads: 27
Joined: Apr 2006
* Setting above 0 will force weapons to stay for their normal period plus this #rnrnI am guessing that is in seconds...Threads: 57
Joined: Oct 2005
DAYS!rnrnIt's technically gametime #s which I am pretty sure is seconds.
Threads: 12
Joined: Jul 2006
sweet it works! Thanks!
Threads: 12
Joined: Jul 2006
I found a problem. When I set it to -1, and then I set it to something else, the guns/corpses won't disapear.
Threads: 12
Joined: Jul 2006
Also, when you set the gun/corpsestay to 1 min. then you set it to 2 sec. after you drop a gun or someone dies, that won't dissapear until a min. is up.
Threads: 57
Joined: Oct 2005
It's designed that way. Each individual corpse or weapon has its own timer that is set when they are created/dropped.
Threads: 12
Joined: Jul 2006
I have a problem. Every time I use that mod, no one can join the server. I can't join either. It'll start loading, then it'll just get stuck at a part.
Threads: 57
Joined: Oct 2005
Do you have the fakemeta module enabled on your server?rnThat's very strange...this plugin doesn't do anything that would do that. And it works fine for me.
Threads: 57
Joined: Oct 2005
Updated. Fixed runtime error.
Threads: 0
Joined: Jun 2008
Hmm, there isn't any instructions on where to put the files, which folder do I place it in?
Threads: 57
Joined: Oct 2005
There aren't any instructions because it's the same as any other plugin ;)nnJust put the .amxx file into the /plugins/ and add the filename to configs/plugins.ini
Threads: 2
Joined: May 2008
dam wilson =)
Threads: 24
Joined: Oct 2006
Suggestion: add this code to your corpse generation parameters. It will allow the corpse to take on the 'body' of the victim. Without it, your corpse will spawn helmets and change faces etc. The gear part of the model, as far as I can tell, can't be set on a non-player entity. That's why the body parameter is mathmatically adjusted, to eliminate the gear part.rnrn
new m_iBody = get_msg_arg_int(9)rnm_iBody -= (m_iBody / 336) * 336rnset_pev(ent, pev_body, m_iBody)rnrnI use it in a plugin I wrote (based off of this one BTW, Thanks) that makes the corpse 'fade away' (instead of just sinking into oblivion) and it works nicely.rnrnEdit:rnPosted Corpse Fade plugin.rn-Threads: 54
Joined: May 2005
Suggestion: add this code to your corpse generation parameters. It will allow the corpse to take on the 'body' of the victim. Without it, your corpse will spawn helmets and change faces etc. The gear part of the model, as far as I can tell, can't be set on a non-player entity. That's why the body parameter is mathmatically adjusted, to eliminate the gear part.n nn nyour code can be simplified ... remove the goofy math (no matter what m_iBody is it ends up being 0 all the time)n nn nI use it in a plugin I wrote (based off of this one BTW, Thanks) that makes the corpse 'fade away' (instead of just sinking into oblivion) and it works nicely.n nEdit:nPosted Corpse Fade plugin.n-new m_iBody = get_msg_arg_int(9)nm_iBody -= (m_iBody / 336) * 336nset_pev(ent, pev_body, m_iBody)
set_pev(ent,pev_body,0);Threads: 24
Joined: Oct 2006
|= TatsuSaisei;11437']no matter what m_iBody is it ends up being 0 all the timernThe pev_body value on a player can be 0, but its usually not. Its a sumation of the different body parts (body, helmet, head, and gear). Setting the pev_body changes the model displayed. Allowing you to control those elements. As explained in the post, the math is needed to eliminate the gear. Setting the body on a player is different than setting a body on other entities. Players can accept an integer body value, whereas other entities only accept a byte (256 max) value. So setting the body with gear included can produce undesireable results.
Threads: 103
Joined: May 2005
wow in the process of writing a big long post because i wasnt understanding the math.. i got the solution.. woohoo saves me looking like a complete fool (ill take partial fool any day!)nni wasnt getting any 0's but i was always having the body value being the same before and after... then i did the math without using float values after the division.. all groovy now lol.. :Dnnntho im curious as to how you came about the 336 value..
Threads: 24
Joined: Oct 2006
tho im curious as to how you came about the 336 value..rnlol - it wasn't easy. Mainly trial and error setting the pev_body value on players. Although it sounds easy now, after you figure it out.rnrnOn the player model. There are 4 model part groups, Body, Helmet, Head and Gear which are set via the pev_body key. Once you've cycled through all of one body part, increasing the value jumps to the next body part. Then the count starts all over again. Kind of a funky binary count, only in decimal.rnrnThe Body part has 6 submodels (#s 0 - 5).rnThe Helmet part has 8 submodels (#s that are multiples of 6 (0, 6, 12, 18, 24, 30, 36, 42).rnThe Head part has 7 submodels (#s that are multiples of 48 (0, 48, 96, 144, 192, 240, 288).rnThe Gear part has 7 submodels (#s that are multiples of 336 (0, 336, 672, 1008, 1344, 1680, 2016)rnrnSo, to eliminate the Gear part, do the math. And like I said, while you CAN set pev_body to these values on a PLAYER, the value seems to be limited to byte-size on other entity types. Weird. But then again, I think DOD is the only HL1 mod to have this many body options.
Threads: 54
Joined: May 2005
Forgive me, I completely forgot how "integer" math is handled (truncates the numbers after any decimal) and after reading your further comments I have to say even I didn't realize DoD had that sort of depth in setting "body numbers" ... I believe that may "answer" some other long standing questions I have had... n nSo while I am "sorry" to have said your math was "goofy", I am glad I said something and got this explanation out of you.n nSorry, and Thanx !!
Threads: 6
Joined: May 2005
Does anyone know if there are issues with this conflicting with other plugins, or server stability issues, beyond the extra strain caused by a higher entity count? I'm wondering specifically about the Damage Infliction and Medic mods. I'm just getting a lot of small weird glitches, and I'm wondering if they might be related to this plugin.rnrnThe only reason why I am singling out this plugin is that I know that Sturmbot used to have the option to have corpses not decay, and it was known to cause problems at times.rnrnedit: Actually I think I solved my own problems. I find that AMXX plugins that mess with entities need to be loaded at the top of the plugins.ini file, and that appears to have solved the problems I was having with this plugin.

