Wazat
Joined: 15 Oct 2004 Posts: 732 Location: Middle 'o the desert, USA
|
Posted: Thu Aug 20, 2009 10:20 pm Post subject: Re: Monster blast! |
|
|
redrum wrote: | In my QW mod - The Overlook Hotel - I have monsters.
When I shoot a rocket at their feet they don't go "flying".
How can I get them to "fly" from the blast radius? |
When you apply the velocity from the explosion (T_Damage, or maybe T_RadiusDamage before calling T_Damage), remove their fl_onground flag:
targ.flags = targ.flags - (targ.flags & FL_ONGROUND);
Player and monster movement is distinctly different in that players slide around on the floor and basically do not stick to it. Monsters stick to the floor once they touch it and must be deliberately detached (this is generally the case with all Quake objects except the players, and fast-moving MOVETYPE_BOUNCE objects before they come to a stop).
Edit: Also, flying/swimming monsters have to be specially handled since they never respond to velocity until their movetype is changed (I think... look at the wizard death code. Without the changes made there, the wizard would simply hover in mid-air and never touch the ground). If I remember right, you have to change their movement type to toss (like a dying wizard), let them go flying/falling for a second or two, and then reinstate their original movetype once they've slowed down...
I forget though. _________________ When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work. |
|