Back to the Vavoom Forum Archives


Forum

[Not a bug] Actor::MonsterFallingDamage()

Sat, 26 Nov 2005 19:57:40

Crimson Wizard

Huh, I suppose that THIS time it IS wrong in some way.
void MonsterFallingDamage(void) { int damage; float mom; mom = fabs(Velocity.z) / 35.0; if (mom > 35.0) { // automatic death damage = 10000; } else { damage = ftoi((mom - 23.0) * 6.0); } damage = 10000; // always kill 'em Damage(none, none, damage); }
May be I do not understand something, but as I see, there always be damage of 10000. Why there is a condition block with setting different damage then?
Sun, 27 Nov 2005 11:16:28

Janis Legzdinsh

Yes, conditional block is useless. But that's how Raven implemented it and I didn't bother to clean this up.

Back to the Vavoom Forum Archives