Page 1 of 1

Continuing weapon animations

Posted: Sat May 13, 2006 2:50 pm
by torhu
I'm trying to make it possible to pick up a dynamite with a lit fuse (wq3 mod). Picking it up seems to be doable, guess I can do a custom weapon change in bg_pmove.c, and then use an event if I need any other info transmitted to the client. It sort of works already.

But how can I get the animation to start from the correct frame? PM_StartWeaponAnim() just starts it from the beginning. When the fuse is lit, there's a spark moving down along the fuse. The position of the spark seems to be calculated based on the frame number of the weapon animation. But I'm not quite sure about that last bit.

When lighting the dynamite, the timer is kept in ps.stats[STAT_WP_MODE]. When the dynamite is thrown, it's copied to dynamite->s.apos.trDelta[0] and dynamite->nextthink. dynamite->think is G_ExplodeMissile. So I basically need to reverse this process, and get the dynamite back into the hand of a player, with the spark position and the timer set correctly.

Posted: Mon May 15, 2006 12:17 am
by Caffeine
You could try asking about this over at QuakeSrc.