- scriptified Heretic's Skull Rod.
- Took the opportunity and fixed the logic for the Skull Rod's rain spawner. The old code which was part of the 3D floor submission was unable to work with portals at all. The new approach no longer tries to hide the dead projectile in the ceiling, it leaves it where it is and changes a few flags, so that its z-position can be used as reference to get the actual ceiling. This works for line portals, but for sector portals still requires some changes to sector_t::NextHighestCeilingAt to work, but at least this can be made to work unlike the old code. - added names for the player-related translations to A_SetTranslation. - fixed: Failure to resolve a function argument was checked for, too late. - made the parameter for A_SetTranslation a name instead of a string, because it is more efficient. We do not need full strings here.
This commit is contained in:
parent
c2f7ed7f1c
commit
8dba322775
16 changed files with 569 additions and 520 deletions
|
|
@ -1196,20 +1196,37 @@ void R_GetPlayerTranslation (int color, const FPlayerColorSet *colorset, FPlayer
|
|||
//----------------------------------------------------------------------------
|
||||
static TMap<FName, int> customTranslationMap;
|
||||
|
||||
int R_FindCustomTranslation(const char *name)
|
||||
int R_FindCustomTranslation(FName name)
|
||||
{
|
||||
if (name == nullptr)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
// Ice is a special case which will remain in its original slot.
|
||||
if (!stricmp(name, "Ice"))
|
||||
switch (name)
|
||||
{
|
||||
case NAME_Ice:
|
||||
// Ice is a special case which will remain in its original slot.
|
||||
return TRANSLATION(TRANSLATION_Standard, 7);
|
||||
}
|
||||
else if (!stricmp(name, "None"))
|
||||
{
|
||||
|
||||
case NAME_None:
|
||||
return 0;
|
||||
|
||||
case NAME_RainPillar1:
|
||||
case NAME_RainPillar2:
|
||||
case NAME_RainPillar3:
|
||||
case NAME_RainPillar4:
|
||||
case NAME_RainPillar5:
|
||||
case NAME_RainPillar6:
|
||||
case NAME_RainPillar7:
|
||||
case NAME_RainPillar8:
|
||||
return TRANSLATION(TRANSLATION_RainPillar, name.GetIndex() - NAME_RainPillar1);
|
||||
|
||||
case NAME_Player1:
|
||||
case NAME_Player2:
|
||||
case NAME_Player3:
|
||||
case NAME_Player4:
|
||||
case NAME_Player5:
|
||||
case NAME_Player6:
|
||||
case NAME_Player7:
|
||||
case NAME_Player8:
|
||||
return TRANSLATION(TRANSLATION_Players, name.GetIndex() - NAME_Player1);
|
||||
|
||||
}
|
||||
int *t = customTranslationMap.CheckKey(FName(name, true));
|
||||
return (t != nullptr)? *t : -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue