Markaine
03-31-2003, 09:22 AM
I'm trying to add a command that makes only the upper part of your body nonsolid so that laser fire passes through you. I've tried all sorts of things.
This is how its supposed to work:
If I press "x" the torso, arms, and head are ignored by a shot, but only until the animation ends.
This is what I have so far:
else if (Q_stricmp(cmd, "evade") == 0)
{
knownCmd = qtrue;
{
if (Q_irand(0,2))
{
StandardSetBodyAnim(ent, BOTH_DODGE_L, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FL AG_HOLDLESS);
}
else
{
StandardSetBodyAnim(ent, BOTH_DODGE_R, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FL AG_HOLDLESS);
}
ent->client->ps.powerups[PW_SPEEDBURST] = level.time + 100;
(a million failed attempts at coding it right...)
Is that passthrough code what I need to study more?
Or should I add some stuff to combat.c? Then again it might mess with the jedidodgeevasion stuff.
This is how its supposed to work:
If I press "x" the torso, arms, and head are ignored by a shot, but only until the animation ends.
This is what I have so far:
else if (Q_stricmp(cmd, "evade") == 0)
{
knownCmd = qtrue;
{
if (Q_irand(0,2))
{
StandardSetBodyAnim(ent, BOTH_DODGE_L, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FL AG_HOLDLESS);
}
else
{
StandardSetBodyAnim(ent, BOTH_DODGE_R, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FL AG_HOLDLESS);
}
ent->client->ps.powerups[PW_SPEEDBURST] = level.time + 100;
(a million failed attempts at coding it right...)
Is that passthrough code what I need to study more?
Or should I add some stuff to combat.c? Then again it might mess with the jedidodgeevasion stuff.