mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
P_SetupEmblem: Only call Tag_FGet once, and store the result for loop iteration/error messages
This commit is contained in:
parent
66d8d8757e
commit
8878bf8465
1 changed files with 3 additions and 2 deletions
|
|
@ -12244,10 +12244,11 @@ static boolean P_SetupEmblem(mapthing_t *mthing, mobj_t *mobj)
|
||||||
INT32 j;
|
INT32 j;
|
||||||
emblem_t* emblem = M_GetLevelEmblems(gamemap);
|
emblem_t* emblem = M_GetLevelEmblems(gamemap);
|
||||||
skincolornum_t emcolor;
|
skincolornum_t emcolor;
|
||||||
|
INT16 tagnum = Tag_FGet(&mthing->tags);
|
||||||
|
|
||||||
while (emblem)
|
while (emblem)
|
||||||
{
|
{
|
||||||
if (emblem->type == ET_GLOBAL && emblem->tag == Tag_FGet(&mthing->tags))
|
if (emblem->type == ET_GLOBAL && emblem->tag == tagnum)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
emblem = M_GetLevelEmblems(-1);
|
emblem = M_GetLevelEmblems(-1);
|
||||||
|
|
@ -12255,7 +12256,7 @@ static boolean P_SetupEmblem(mapthing_t *mthing, mobj_t *mobj)
|
||||||
|
|
||||||
if (!emblem)
|
if (!emblem)
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_WARNING, "P_SetupEmblem: No map emblem for map %d with tag %d found!\n", gamemap, Tag_FGet(&mthing->tags));
|
CONS_Alert(CONS_WARNING, "P_SetupEmblem: No map emblem for map %d with tag %d found!\n", gamemap, tagnum);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue