#ifndef ANIMDECIDE_H #define ANIMDECIDE_H #if defined(CSQC) #include "util-pre.qh" #include "../client/sys-pre.qh" #include "../dpdefs/csprogsdefs.qc" #include "../client/sys-post.qh" #include "../client/Defs.qc" #include "../dpdefs/keycodes.qc" #include "constants.qh" #include "stats.qh" #include "../warpzonelib/anglestransform.qh" #include "../warpzonelib/mathlib.qh" #include "../warpzonelib/common.qh" #include "../warpzonelib/client.qh" #include "playerstats.qh" #include "teams.qh" #include "util.qh" #include "nades.qh" #include "buffs.qh" #include "test.qh" #include "counting.qh" #include "weapons/weapons.qh" #include "mapinfo.qh" #include "command/markup.qh" #include "command/rpn.qh" #include "command/generic.qh" #include "command/shared_defs.qh" #include "urllib.qh" #elif defined(MENUQC) #elif defined(SVQC) #include "util-pre.qh" #include "../server/sys-pre.qh" #include "../dpdefs/progsdefs.qc" #include "../dpdefs/dpextensions.qc" #include "../server/sys-post.qh" #include "../warpzonelib/anglestransform.qh" #include "../warpzonelib/mathlib.qh" #include "../warpzonelib/common.qh" #include "../warpzonelib/util_server.qh" #include "../warpzonelib/server.qh" #include "constants.qh" #include "stats.qh" #include "teams.qh" #include "util.qh" #include "nades.qh" #include "buffs.qh" #include "test.qh" #include "counting.qh" #include "urllib.qh" #include "command/markup.qh" #include "command/rpn.qh" #include "command/generic.qh" #include "command/shared_defs.qh" #include "net_notice.qh" #endif // must be called at least once to initialize, or when modelindex is changed void animdecide_load_if_needed(entity e); // client side frame inferring void animdecide_setimplicitstate(entity e, float onground); void animdecide_setframes(entity e, bool support_blending, .int fld_frame, .int fld_frame1time, .int fld_frame2, .int fld_frame2time); // please network this one .int anim_state; .float anim_time; .float anim_lower_action; .float anim_lower_time; .float anim_upper_action; .float anim_upper_time; // when copying entities, copy these too .int anim_implicit_state; .float anim_implicit_time; .float anim_lower_implicit_action; .float anim_lower_implicit_time; .float anim_upper_implicit_action; .float anim_upper_implicit_time; // explicit anim states (networked) void animdecide_setstate(entity e, float newstate, float restart); const int ANIMSTATE_DEAD1 = 1; // base frames: die1 const int ANIMSTATE_DEAD2 = 2; // base frames: die2 const int ANIMSTATE_DUCK = 4; // turns walk into duckwalk, jump into duckjump, etc. const int ANIMSTATE_FROZEN = 8; // force idle // implicit anim states (inferred from velocity, etc.) const int ANIMIMPLICITSTATE_INAIR = 1; const int ANIMIMPLICITSTATE_FORWARD = 2; const int ANIMIMPLICITSTATE_BACKWARDS = 4; const int ANIMIMPLICITSTATE_LEFT = 8; const int ANIMIMPLICITSTATE_RIGHT = 16; const int ANIMIMPLICITSTATE_JUMPRELEASED = 32; // explicit actions (networked); negative values are for lower body void animdecide_setaction(entity e, float action, float restart); const int ANIMACTION_JUMP = -1; // jump const int ANIMACTION_DRAW = 1; // draw const int ANIMACTION_PAIN1 = 2; // pain const int ANIMACTION_PAIN2 = 3; // pain const int ANIMACTION_SHOOT = 4; // shoot const int ANIMACTION_TAUNT = 5; // taunt const int ANIMACTION_MELEE = 6; // melee #endif