- fixed: Any player class inheriting directly from PlayerPawn was left with
empty weapon slots due to the recent rewrite of the weapon slot assignment code. To handle such classes each game now defines a default weapon slot setting in its gameinfo. This will be used when a player class without any weapon slot settings is used. SVN r1521 (trunk)
This commit is contained in:
parent
9d47afb304
commit
78fb48302c
10 changed files with 100 additions and 1 deletions
21
src/gi.cpp
21
src/gi.cpp
|
|
@ -175,7 +175,26 @@ void FMapInfoParser::ParseGameInfo()
|
|||
FString nextKey = sc.String;
|
||||
sc.MustGetToken('=');
|
||||
|
||||
if(nextKey.CompareNoCase("border") == 0)
|
||||
if (nextKey.CompareNoCase("weaponslot") == 0)
|
||||
{
|
||||
sc.MustGetToken(TK_IntConst);
|
||||
if (sc.Number < 0 || sc.Number >= 10)
|
||||
{
|
||||
sc.ScriptError("Weapon slot index must be in range [0..9].\n");
|
||||
}
|
||||
int i = sc.Number;
|
||||
gameinfo.DefaultWeaponSlots[i].Clear();
|
||||
sc.MustGetToken(',');
|
||||
do
|
||||
{
|
||||
sc.MustGetString();
|
||||
FName val = sc.String;
|
||||
gameinfo.DefaultWeaponSlots[i].Push(val);
|
||||
|
||||
}
|
||||
while (sc.CheckToken(','));
|
||||
}
|
||||
else if(nextKey.CompareNoCase("border") == 0)
|
||||
{
|
||||
if(sc.CheckToken(TK_Identifier))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue