Forum

Monster blast!

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Monster blast!

Postby redrum » Thu Aug 20, 2009 10:14 pm

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: The-Overlook-Hotel.game-server.cc
User avatar
redrum
 
Posts: 410
Joined: Wed Mar 28, 2007 11:35 pm
Location: Long Island, New York

Re: Monster blast!

Postby Wazat » Thu Aug 20, 2009 10:20 pm

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.
Wazat
 
Posts: 771
Joined: Fri Oct 15, 2004 9:50 pm
Location: Middle 'o the desert, USA


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest