Skip to content

Commit d4e6815

Browse files
committed
Fix invalid ped skin IDs accepted by map/XML ped loading
1 parent e1cff67 commit d4e6815

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Server/mods/deathmatch/logic/CPedManager.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "StdInc.h"
1313
#include "CPedManager.h"
1414
#include "CPed.h"
15+
#include "CPlayerManager.h"
1516
#include "Utils.h"
1617

1718
CPedManager::CPedManager()
@@ -74,5 +75,7 @@ bool CPedManager::Exists(CPed* pPed)
7475

7576
bool CPedManager::IsValidModel(unsigned short usModel)
7677
{
77-
return true;
78+
// Peds created from maps/XML also end up here, so keep this aligned with the
79+
// script-facing validator and reject unused GTA skin IDs before they can be synced.
80+
return CPlayerManager::IsValidPlayerModel(usModel);
7881
}

0 commit comments

Comments
 (0)