Inside3D!
     

Monster blast!

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
redrum



Joined: 28 Mar 2007
Posts: 367
Location: Long Island, New York

PostPosted: Thu Aug 20, 2009 10:14 pm    Post subject: Monster blast! Reply with quote

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?
_________________
Welcome to the Overlook Hotel 69.113.123.178:27500
Back to top
View user's profile Send private message Send e-mail
Wazat



Joined: 15 Oct 2004
Posts: 732
Location: Middle 'o the desert, USA

PostPosted: Thu Aug 20, 2009 10:20 pm    Post subject: Re: Monster blast! Reply with quote

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.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group