mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
ACS: Try to fix sprnames garbage
This commit is contained in:
parent
d953049c78
commit
4f2c47fde0
1 changed files with 4 additions and 2 deletions
|
|
@ -159,7 +159,7 @@ static bool ACS_GetSpriteFromString(const char *word, spritenum_t *type)
|
||||||
|
|
||||||
for (int i = 0; i < NUMSPRITES; i++)
|
for (int i = 0; i < NUMSPRITES; i++)
|
||||||
{
|
{
|
||||||
if (fastcmp(word, sprnames[i]))
|
if (fastncmp(word, sprnames[i], 4))
|
||||||
{
|
{
|
||||||
*type = static_cast<spritenum_t>(i);
|
*type = static_cast<spritenum_t>(i);
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -2529,7 +2529,9 @@ bool CallFunc_GetThingProperty(ACSVM::Thread *thread, const ACSVM::Word *argV, A
|
||||||
#define PROP_SPR(x, y) \
|
#define PROP_SPR(x, y) \
|
||||||
case x: \
|
case x: \
|
||||||
{ \
|
{ \
|
||||||
value = static_cast<INT32>( ~env->getString( sprnames[ mobj->y ] )->idx ); \
|
char crunched[5] = {0}; \
|
||||||
|
strncpy(crunched, sprnames[ mobj->y ], 4); \
|
||||||
|
value = static_cast<INT32>( ~env->getString( crunched )->idx ); \
|
||||||
break; \
|
break; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue