fix: problems with breakable on cs_mari (ref #686)

fix: goal selection on some zombie  maps (ref #684)
This commit is contained in:
jeefo 2025-04-03 15:12:06 +03:00
commit d6d76e136d
No known key found for this signature in database
GPG key ID: D696786B81B667C8
12 changed files with 95 additions and 86 deletions

View file

@ -459,7 +459,7 @@ CR_EXPORT int GetEntityAPI (gamefuncs_t *table, int interfaceVersion) {
// would all have the dull "models/player.mdl" one). The entity for which the keyvalue data
// pointer is requested is pentKeyvalue, the pointer to the keyvalue data structure pkvd.
if (game.isNullEntity (ent) && strcmp (ent->v.classname.chars (), "func_breakable") == 0) {
if (!game.isNullEntity (ent) && strcmp (ent->v.classname.chars (), "func_breakable") == 0) {
if (kvd && kvd->szKeyName && strcmp (kvd->szKeyName, "material") == 0) {
if (atoi (kvd->szValue) == 7) {
game.markBreakableAsInvalid (ent);