mirror of
https://github.com/rehlds/rehlds.git
synced 2025-04-18 07:12:31 +03:00
Fixed: parameter constraint in PF_lightstyle_I
This commit is contained in:
parent
6a9d611a25
commit
656c5d5f52
@ -1839,9 +1839,10 @@ void ParseSaveTables(SAVERESTOREDATA *pSaveData, SAVE_HEADER *pHeader, int updat
|
|||||||
gEntityInterface.pfnSaveReadFields(pSaveData, "LIGHTSTYLE", &light, gLightstyleDescription, ARRAYSIZE(gLightstyleDescription));
|
gEntityInterface.pfnSaveReadFields(pSaveData, "LIGHTSTYLE", &light, gLightstyleDescription, ARRAYSIZE(gLightstyleDescription));
|
||||||
if (updateGlobals)
|
if (updateGlobals)
|
||||||
{
|
{
|
||||||
g_psv.lightstyles[light.index] = (char *)Hunk_Alloc(Q_strlen(light.style) + 1);
|
char *val = (char *)Hunk_Alloc(Q_strlen(light.style) + 1);
|
||||||
Q_strncpy(g_psv.lightstyles[light.index], light.style, 3);
|
Q_strncpy(val, light.style, 3);
|
||||||
g_psv.lightstyles[light.index][3] = 0;
|
val[3] = 0;
|
||||||
|
g_psv.lightstyles[light.index] = val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1710,7 +1710,7 @@ int EXT_FUNC PF_DecalIndex(const char *name)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EXT_FUNC PF_lightstyle_I(int style, char *val)
|
void EXT_FUNC PF_lightstyle_I(int style, const char *val)
|
||||||
{
|
{
|
||||||
g_psv.lightstyles[style] = val;
|
g_psv.lightstyles[style] = val;
|
||||||
if (g_psv.state != ss_active)
|
if (g_psv.state != ss_active)
|
||||||
|
@ -161,7 +161,7 @@ void PF_SetClientKeyValue_I(int clientIndex, char *infobuffer, const char *key,
|
|||||||
int PF_walkmove_I(edict_t *ent, float yaw, float dist, int iMode);
|
int PF_walkmove_I(edict_t *ent, float yaw, float dist, int iMode);
|
||||||
int PF_droptofloor_I(edict_t *ent);
|
int PF_droptofloor_I(edict_t *ent);
|
||||||
int PF_DecalIndex(const char *name);
|
int PF_DecalIndex(const char *name);
|
||||||
void PF_lightstyle_I(int style, char *val);
|
void PF_lightstyle_I(int style, const char *val);
|
||||||
int PF_checkbottom_I(edict_t *pEdict);
|
int PF_checkbottom_I(edict_t *pEdict);
|
||||||
int PF_pointcontents_I(const float *rgflVector);
|
int PF_pointcontents_I(const float *rgflVector);
|
||||||
void PF_aim_I(edict_t *ent, float speed, float *rgflReturn);
|
void PF_aim_I(edict_t *ent, float speed, float *rgflReturn);
|
||||||
|
@ -129,7 +129,7 @@ typedef struct server_s
|
|||||||
const char *generic_precache[MAX_GENERIC];
|
const char *generic_precache[MAX_GENERIC];
|
||||||
char generic_precache_names[MAX_GENERIC][64];
|
char generic_precache_names[MAX_GENERIC][64];
|
||||||
int num_generic_names;
|
int num_generic_names;
|
||||||
char *lightstyles[MAX_LIGHTSTYLES];
|
const char *lightstyles[MAX_LIGHTSTYLES];
|
||||||
int num_edicts;
|
int num_edicts;
|
||||||
int max_edicts;
|
int max_edicts;
|
||||||
edict_t *edicts;
|
edict_t *edicts;
|
||||||
|
@ -148,7 +148,7 @@ typedef struct enginefuncs_s
|
|||||||
void (*pfnServerExecute) (void);
|
void (*pfnServerExecute) (void);
|
||||||
void (*pfnClientCommand) (edict_t* pEdict, const char* szFmt, ...);
|
void (*pfnClientCommand) (edict_t* pEdict, const char* szFmt, ...);
|
||||||
void (*pfnParticleEffect) (const float *org, const float *dir, float color, float count);
|
void (*pfnParticleEffect) (const float *org, const float *dir, float color, float count);
|
||||||
void (*pfnLightStyle) (int style, char* val);
|
void (*pfnLightStyle) (int style, const char* val);
|
||||||
int (*pfnDecalIndex) (const char *name);
|
int (*pfnDecalIndex) (const char *name);
|
||||||
int (*pfnPointContents) (const float *rgflVector);
|
int (*pfnPointContents) (const float *rgflVector);
|
||||||
void (*pfnMessageBegin) (int msg_dest, int msg_type, const float *pOrigin, edict_t *ed);
|
void (*pfnMessageBegin) (int msg_dest, int msg_type, const float *pOrigin, edict_t *ed);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user