More bugs?

1) FM_CreateInstancedBaselines has been renamed to FM_CreateInstBaselines
2) DLLFunc_CreateInstancedBaseline has been renamed to DLLFunc_CreateInstBaselines
(I'd be extremely surprised if someone complained about the above 2 changes)
3) New hookable GameDLL func: FM_CreateBaseline
4) New hookable Engine func: FM_CreateInstBaseline
5) New GameDLL func that can be called via dllfunc: CreateBaseline
6) New GameDLL func that can be called via engfunc: CreateInstancedBaseline
7) Added some comments to each member of various enums that correspond to special structs in the engine and/or game dll
This commit is contained in:
Scott Ehlert 2006-05-05 08:07:31 +00:00
parent ed19c53552
commit 21ffd88bdd
2 changed files with 160 additions and 142 deletions

View File

@ -105,6 +105,7 @@ enum {
EngFunc_InfoKeyValue, // char*) (char *infobuffer, char *key); EngFunc_InfoKeyValue, // char*) (char *infobuffer, char *key);
EngFunc_SetKeyValue, // void ) (char *infobuffer, char *key, char *value); EngFunc_SetKeyValue, // void ) (char *infobuffer, char *key, char *value);
EngFunc_SetClientKeyValue, // void ) (int clientIndex, char *infobuffer, char *key, char *value); EngFunc_SetClientKeyValue, // void ) (int clientIndex, char *infobuffer, char *key, char *value);
EngFunc_CreateInstBaseline // int ) (int classname, struct entity_state_s *baseline);
}; };
/* Used with dllfunc() /* Used with dllfunc()
@ -156,7 +157,7 @@ enum
DLLFunc_GetHullBounds, // int ) (int hullnumber, float *mins, float *maxs); DLLFunc_GetHullBounds, // int ) (int hullnumber, float *mins, float *maxs);
// Create baselines for certain "unplaced" items. // Create baselines for certain "unplaced" items.
DLLFunc_CreateInstancedBaseline, // void ) ( void ); DLLFunc_CreateInstBaselines, // void ) ( void );
DLLFunc_pfnAllowLagCompensation, // int ) ( void ); DLLFunc_pfnAllowLagCompensation, // int ) ( void );
// I know this does not fit with DLLFUNC(), but I don't want another native just for it. // I know this does not fit with DLLFUNC(), but I don't want another native just for it.
MetaFunc_CallGameEntity, // bool ) (plid_t plid, const char *entStr,entvars_t *pev); MetaFunc_CallGameEntity, // bool ) (plid_t plid, const char *entStr,entvars_t *pev);
@ -167,7 +168,8 @@ enum
DLLFunc_AddToFullPack, // int ) (struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet); DLLFunc_AddToFullPack, // int ) (struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet);
// You can pass in 0 for global usercmd handle or another usercmd handle here // You can pass in 0 for global usercmd handle or another usercmd handle here
DLLFunc_CmdStart, // void ) (const edict_t *player, const struct usercmd_s *cmd, unsigned int random_seed); DLLFunc_CmdStart, // void ) (const edict_t *player, const struct usercmd_s *cmd, unsigned int random_seed);
DLLFunc_CmdEnd // void ) (const edict_t *player); DLLFunc_CmdEnd, // void ) (const edict_t *player);
DLLFunc_CreateBaseline // void ) (int player, int eindex, struct entity_state_s *baseline, struct edict_s *entity, int playermodelindex, vec3_t player_mins, vec3_t player_maxs);
}; };
enum { enum {
@ -500,7 +502,7 @@ enum {
FM_RegisterEncoders, FM_RegisterEncoders,
// Create baselines for certain "unplaced" items. // Create baselines for certain "unplaced" items.
FM_CreateInstancedBaselines, FM_CreateInstBaselines,
FM_AllowLagCompensation, FM_AllowLagCompensation,
FM_AlertMessage, FM_AlertMessage,
@ -516,186 +518,198 @@ enum {
FM_UpdateClientData, FM_UpdateClientData,
FM_AddToFullPack, FM_AddToFullPack,
FM_CmdStart, FM_CmdStart,
FM_CmdEnd FM_CmdEnd,
FM_CreateInstBaseline,
FM_CreateBaseline
}; };
enum TraceResult enum TraceResult
{ {
TR_AllSolid, TR_AllSolid, // int
TR_StartSolid, TR_StartSolid, // int
TR_InOpen, TR_InOpen, // int
TR_InWater, TR_InWater, // int
TR_flFraction, TR_flFraction, // float
TR_vecEndPos, TR_vecEndPos, // float array[3]
TR_flPlaneDist, TR_flPlaneDist, // float
TR_vecPlaneNormal, TR_vecPlaneNormal, // float array[3]
TR_pHit, TR_pHit, // int (edict_t*)
TR_iHitgroup, TR_iHitgroup, // int
}; };
enum KeyValueData enum KeyValueData
{ {
KV_ClassName, KV_ClassName, // string
KV_KeyName, KV_KeyName, // string
KV_Value, KV_Value, // string
KV_fHandled KV_fHandled // int
}; };
enum ClientData enum ClientData
{ {
CD_Origin, CD_Origin, // float array[3]
CD_Velocity, CD_Velocity, // float array[3]
CD_ViewModel, CD_ViewModel, // int
CD_PunchAngle, CD_PunchAngle, // float array[3]
CD_Flags, CD_Flags, // int
CD_WaterLevel, CD_WaterLevel, // int
CD_WaterType, CD_WaterType, // int
CD_ViewOfs, CD_ViewOfs, // float array[3]
CD_Health, CD_Health, // float
CD_bInDuck, CD_bInDuck, // int
CD_Weapons, CD_Weapons, // int
CD_flTimeStepSound, CD_flTimeStepSound, // int
CD_flDuckTime, CD_flDuckTime, // int
CD_flSwimTime, CD_flSwimTime, // int
CD_WaterJumpTime, CD_WaterJumpTime, // int
CD_MaxSpeed, CD_MaxSpeed, // float
CD_FOV, CD_FOV, // float
CD_WeaponAnim, CD_WeaponAnim, // int
CD_ID, CD_ID, // int
CD_AmmoShells, CD_AmmoShells, // int
CD_AmmoNails, CD_AmmoNails, // int
CD_AmmoCells, CD_AmmoCells, // int
CD_AmmoRockets, CD_AmmoRockets, // int
CD_flNextAttack, CD_flNextAttack, // float
CD_tfState, CD_tfState, // int
CD_PushMsec, CD_PushMsec, // int
CD_DeadFlag, CD_DeadFlag, // int
CD_PhysInfo, CD_PhysInfo, // string[256]
CD_iUser1, CD_iUser1, // int
CD_iUser2, CD_iUser2, // int
CD_iUser3, CD_iUser3, // int
CD_iUser4, CD_iUser4, // int
CD_fUser1, CD_fUser1, // float
CD_fUser2, CD_fUser2, // float
CD_fUser3, CD_fUser3, // float
CD_fUser4, CD_fUser4, // float
CD_vUser1, CD_vUser1, // float array[3]
CD_vUser2, CD_vUser2, // float array[3]
CD_vUser3, CD_vUser3, // float array[3]
CD_vUser4 CD_vUser4 // float array[3]
}; };
enum EntityState enum EntityState
{ {
// Fields which are filled in by routines outside of delta compression // Fields which are filled in by routines outside of delta compression
ES_EntityType, ES_EntityType, // int
// Index into cl_entities array for this entity // Index into cl_entities array for this entity
ES_Number, ES_Number, // int
ES_MsgTime, ES_MsgTime, // float
// Message number last time the player/entity state was updated // Message number last time the player/entity state was updated
ES_MessageNum, ES_MessageNum, // int
// Fields which can be transitted and reconstructed over the network stream // Fields which can be transitted and reconstructed over the network stream
ES_Origin, ES_Origin, // float array[3]
ES_Angles, ES_Angles, // float array[3]
ES_ModelIndex, ES_ModelIndex, // int
ES_Sequence, ES_Sequence, // int
ES_Frame, ES_Frame, // float
ES_ColorMap, ES_ColorMap, // int
ES_Skin, ES_Skin, // short
ES_Solid, ES_Solid, // short
ES_Effects, ES_Effects, // int
ES_Scale, ES_Scale, // float
ES_eFlags, ES_eFlags, // byte
// Render information // Render information
ES_RenderMode, ES_RenderMode, // int
ES_RenderAmt, ES_RenderAmt, // int
ES_RenderColor, ES_RenderColor, // byte array[3], RGB value
ES_RenderFx, ES_RenderFx, // int
ES_MoveType, ES_MoveType, // int
ES_AnimTime, ES_AnimTime, // float
ES_FrameRate, ES_FrameRate, // float
ES_Body, ES_Body, // int
ES_Controller, ES_Controller, // byte array[4]
ES_Blending, ES_Blending, // byte array[4]
ES_Velocity, ES_Velocity, // float array[3]
// Send bbox down to client for use during prediction // Send bbox down to client for use during prediction
ES_Mins, ES_Mins, // float array[3]
ES_Maxs, ES_Maxs, // float array[3]
ES_AimEnt, ES_AimEnt, // int
// If owned by a player, the index of that player (for projectiles) // If owned by a player, the index of that player (for projectiles)
ES_Owner, ES_Owner, // int
// Friction, for prediction // Friction, for prediction
ES_Friction, ES_Friction, // float
// Gravity multiplier // Gravity multiplier
ES_Gravity, ES_Gravity, // float
// PLAYER SPECIFIC // PLAYER SPECIFIC
ES_Team, ES_Team, // int
ES_PlayerClass, ES_PlayerClass, // int
ES_Health, ES_Health, // int
ES_Spectator, ES_Spectator, // bool
ES_WeaponModel, ES_WeaponModel, // int
ES_GaitSequence, ES_GaitSequence, // int
// If standing on conveyor, e.g. // If standing on conveyor, e.g.
ES_BaseVelocity, ES_BaseVelocity, // float array[3]
// Use the crouched hull, or the regular player hull // Use the crouched hull, or the regular player hull
ES_UseHull, ES_UseHull, // int
// Latched buttons last time state updated // Latched buttons last time state updated
ES_OldButtons, ES_OldButtons, // int
// -1 = in air, else pmove entity number // -1 = in air, else pmove entity number
ES_OnGround, ES_OnGround, // int
ES_iStepLeft, ES_iStepLeft, // int
// How fast we are falling // How fast we are falling
ES_flFallVelocity, ES_flFallVelocity, // float
ES_FOV, ES_FOV, // float
ES_WeaponAnim, ES_WeaponAnim, // int
// Parametric movement overrides // Parametric movement overrides
ES_StartPos, ES_StartPos, // float array[3]
ES_EndPos, ES_EndPos, // float array[3]
ES_ImpactTime, ES_ImpactTime, // float
ES_StartTime, ES_StartTime, // float
// For mods // For mods
ES_iUser1, ES_iUser1, // int
ES_iUser2, ES_iUser2, // int
ES_iUser3, ES_iUser3, // int
ES_iUser4, ES_iUser4, // int
ES_fUser1, ES_fUser1, // float
ES_fUser2, ES_fUser2, // float
ES_fUser3, ES_fUser3, // float
ES_fUser4, ES_fUser4, // float
ES_vUser1, ES_vUser1, // float array[3]
ES_vUser2, ES_vUser2, // float array[3]
ES_vUser3, ES_vUser3, // float array[3]
ES_vUser4 ES_vUser4 // float array[3]
}; };
enum UserCmd enum UserCmd
{ {
UC_LerpMsec, // Interpolation time on client // Interpolation time on client
UC_Msec, // Duration in ms of command UC_LerpMsec, // short
UC_ViewAngles, // Command view angles // Duration in ms of command
UC_Msec, // byte
// Command view angles
UC_ViewAngles, // float array[3]
// Intended velocities // Intended velocities
UC_ForwardMove, // Forward velocity // Forward velocity
UC_SideMove, // Sideways velocity UC_ForwardMove, // float
UC_UpMove, // Upward velocity // Sideways velocity
UC_LightLevel, // Light level at spot where we are standing UC_SideMove, // float
UC_Buttons, // Attack buttons // Upward velocity
UC_Impulse, // Impulse command issued UC_UpMove, // float
UC_WeaponSelect, // Current weapon id // Light level at spot where we are standing
UC_LightLevel, // byte
// Attack buttons
UC_Buttons, // unsigned short
// Impulse command issued
UC_Impulse, // byte
// Current weapon id
UC_WeaponSelect, // byte
// Experimental player impact stuff // Experimental player impact stuff
UC_ImpactIndex, UC_ImpactIndex, // int
UC_ImpactPosition UC_ImpactPosition // float array[3]
}; };

View File

@ -183,6 +183,9 @@ stock EF_SetKeyValue(const BUFFER[], const KEY[], const VALUE[])
stock EF_SetClientKeyValue(const ID, const KEY[], const VALUE[]) stock EF_SetClientKeyValue(const ID, const KEY[], const VALUE[])
return engfunc(EngFunc_SetClientKeyValue, ID, KEY, VALUE) return engfunc(EngFunc_SetClientKeyValue, ID, KEY, VALUE)
stock EF_CreateInstBaseline(CLASSNAME, baseline)
return engfunc(EngFunc_CreateInstBaseline, CLASSNAME, baseline)
// DLLFuncs // DLLFuncs
stock DF_GameInit() stock DF_GameInit()
return dllfunc(DLLFunc_GameInit) return dllfunc(DLLFunc_GameInit)
@ -190,10 +193,10 @@ stock DF_Spawn(const ENTITY)
return dllfunc(DLLFunc_Spawn, ENTITY) return dllfunc(DLLFunc_Spawn, ENTITY)
stock DF_Think(const ENTITY) stock DF_Think(const ENTITY)
return dllfunc(DLLFunc_Think, ENTITY) return dllfunc(DLLFunc_Think, ENTITY)
stock DF_Use(const ENT_Used, const ENT_Other) stock DF_Use(const ENT_Used, const ENT_User)
return dllfunc(DLLFunc_Use, ENT_Used, ENT_Other) return dllfunc(DLLFunc_Use, ENT_Used, ENT_User)
stock DF_Touch(const ENT_Touched, const ENT_Other) stock DF_Touch(const ENT_Touched, const ENT_Toucher)
return dllfunc(DLLFunc_Touch, ENT_Touched, ENT_Other) return dllfunc(DLLFunc_Touch, ENT_Touched, ENT_Toucher)
stock DF_Blocked(const ENT_Blocked, const ENT_Other) stock DF_Blocked(const ENT_Blocked, const ENT_Other)
return dllfunc(DLLFunc_Blocked, ENT_Blocked, ENT_Other) return dllfunc(DLLFunc_Blocked, ENT_Blocked, ENT_Other)
@ -241,8 +244,8 @@ stock DF_RegisterEncoders()
stock DF_GetHullBounds(hullnumber, Float:mins[3], Float:maxs[3]) stock DF_GetHullBounds(hullnumber, Float:mins[3], Float:maxs[3])
return dllfunc(DLLFunc_GetHullBounds, hullnumber, mins, maxs) return dllfunc(DLLFunc_GetHullBounds, hullnumber, mins, maxs)
stock DF_CreateInstancedBaseline() stock DF_CreateInstBaselines()
return dllfunc(DLLFunc_CreateInstancedBaseline) return dllfunc(DLLFunc_CreateInstBaselines)
stock DF_pfnAllowLagCompensation() stock DF_pfnAllowLagCompensation()
return dllfunc(DLLFunc_pfnAllowLagCompensation) return dllfunc(DLLFunc_pfnAllowLagCompensation)
stock DF_MetaFunc_CallGameEntity(const STRING[], const ENTITY) stock DF_MetaFunc_CallGameEntity(const STRING[], const ENTITY)
@ -258,4 +261,5 @@ stock DF_CmdStart(const PLAYER, const CMD = 0, randomSeed)
return dllfunc(PLAYER, CMD, randomSeed) return dllfunc(PLAYER, CMD, randomSeed)
stock DF_CmdEnd(const PLAYER) stock DF_CmdEnd(const PLAYER)
return dllfunc(PLAYER) return dllfunc(PLAYER)
stock DF_CreateBaseline(PLAYER, eIndex, baseline, playerModelIndex, Float:playerMins[3], Float:playerMaxs[3])
return dllfunc(DLLFunc_CreateBaseline, PLAYER, eIndex, baseline, playerModelIndex, playerMins, playerMaxs)