diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e9705a..e52ac17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ * Save and restore game_player_equip [#188](https://github.com/SamVanheer/halflife-updated/issues/188) * Moved IsFacing function from barney.cpp to h_ai.cpp to help prevent linker errors when copy pasting source file +* When using `impulse 107` to get the name of a texture the texture type (as used in `materials.txt`) will also be printed +* Made `PM_FindTextureType` const correct ## Changes in V1.0.0 Beta 013 diff --git a/dlls/player.cpp b/dlls/player.cpp index 2897d2a..b8a8187 100644 --- a/dlls/player.cpp +++ b/dlls/player.cpp @@ -3563,7 +3563,7 @@ void CBasePlayer::CheatImpulseCommands(int iImpulse) pWorld = tr.pHit; const char* pTextureName = TRACE_TEXTURE(pWorld, start, end); if (pTextureName) - ALERT(at_console, "Texture: %s\n", pTextureName); + ALERT(at_console, "Texture: %s (%c)\n", pTextureName, PM_FindTextureType(pTextureName)); } break; case 195: // show shortest paths for entire level to nearest node diff --git a/engine/eiface.h b/engine/eiface.h index 606c2d6..4378760 100644 --- a/engine/eiface.h +++ b/engine/eiface.h @@ -455,7 +455,7 @@ typedef struct void (*pfnPM_Move)(struct playermove_s* ppmove, qboolean server); void (*pfnPM_Init)(struct playermove_s* ppmove); - char (*pfnPM_FindTextureType)(char* name); + char (*pfnPM_FindTextureType)(const char* name); void (*pfnSetupVisibility)(struct edict_s* pViewEntity, struct edict_s* pClient, unsigned char** pvs, unsigned char** pas); void (*pfnUpdateClientData)(const struct edict_s* ent, int sendweapons, struct clientdata_s* cd); int (*pfnAddToFullPack)(struct entity_state_s* state, int e, edict_t* ent, edict_t* host, int hostflags, int player, unsigned char* pSet); diff --git a/pm_shared/pm_shared.cpp b/pm_shared/pm_shared.cpp index 446f4ec..7bccf64 100644 --- a/pm_shared/pm_shared.cpp +++ b/pm_shared/pm_shared.cpp @@ -264,7 +264,7 @@ void PM_InitTextureTypes() bTextureTypeInit = true; } -char PM_FindTextureType(char* name) +char PM_FindTextureType(const char* name) { int left, right, pivot; int val; diff --git a/pm_shared/pm_shared.h b/pm_shared/pm_shared.h index 8fad4c5..c074bc7 100644 --- a/pm_shared/pm_shared.h +++ b/pm_shared/pm_shared.h @@ -25,7 +25,7 @@ struct playermove_s; void PM_Init(playermove_s* ppmove); void PM_Move(playermove_s* ppmove, qboolean server); -char PM_FindTextureType(char* name); +char PM_FindTextureType(const char* name); /** * @brief Engine calls this to enumerate player collision hulls, for prediction. Return false if the hullnumber doesn't exist.