View Issue Details

IDProjectCategoryView StatusLast Update
0003391The Dark ModCodingpublic29.04.2013 20:12
Reportergrayman Assigned Tograyman  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
Product VersionTDM 2.00 
Target VersionTDM 2.00Fixed in VersionTDM 2.00 
Summary0003391: Allow warnings and crashes when def entities don't exist
DescriptionAs we head for standalone, we need to know when entities defined in the *.def files don't exist (i.e. we rely on D3 definitions).

The code currently works at cross-purposes in a few spots. At a high level, the code asks for an entity definition, and wants to crash or emit a console warning if it doesn't exist. However, at a lower level, where the entity definition is being retrieved, if it doesn't exist, a dummy is created and handed to the higher level. The higher level says, okay, that's great, this thing exists, so no crash or warning.

Since we want the crashes and warning to alert us to missing definitions, this issue covers code changes to stop supplying dummy default entities in the low level code.
TagsNo tags attached.

Activities

grayman

grayman

29.04.2013 02:34

administrator   ~0005337

In many locations, calls to gameLocal.FindEntityDefDict() are followed by warnings or errors for non-existent definitions. Some of these locations were unknowingly asking this routine to provide an empty default definition, which makes no sense, because the errors and warnings would then not be processed.

To let us see where definitions are missing, I changed the calls to NOT ask for a default. This allows the error or warning code to run, either crashing TDM back to the main menu with an error message complaining about the missing definition, or writing a warning to the console.

All calls to this routine that asked for a default to be provided were left as is.

All calls to this routine that were already asking that a default not be provided were left as is.

Rev. 5743:

CommunicationTask.cpp
AI.cpp
AI_events.cpp
CommunicationSubsystem.cpp
Anim_Blend.cpp
WeaponItem.cpp
Shop.cpp
Response.cpp
Actor.cpp
AFEntity.cpp
DifficultyManager.cpp
Entity.cpp
Moveable.cpp
Player.cpp
Projectile.cpp
SEED.cpp

Rev. 13433:

tdm_game01.pk4

Tested with victim.map.
grayman

grayman

29.04.2013 20:12

administrator   ~0005339

Next round:

Changed the spots where I’d added an explicit “false” to gameLocal.FindEntityDefDict() so that they’d ask for “true”, and added warnings to that routine and three others so that missing resources could be identified.

The warning format is “STANDALONE – can’t find ‘xxxxxxxxx’”

In addition to the source files listed above, the following files were changed:

Rev. 5744:

DeclManager.cpp
GameLocal.cpp

Rev. 13434:

tdm_game01.pk4
TheDarkMod.exe

Issue History

Date Modified Username Field Change
29.04.2013 01:22 grayman New Issue
29.04.2013 01:22 grayman Status new => assigned
29.04.2013 01:22 grayman Assigned To => grayman
29.04.2013 02:34 grayman Note Added: 0005337
29.04.2013 02:34 grayman Status assigned => resolved
29.04.2013 02:34 grayman Resolution open => fixed
29.04.2013 02:34 grayman Fixed in Version => TDM 2.00
29.04.2013 20:12 grayman Note Added: 0005339