Back to the Vavoom Forum Archives


Forum

[Not a bug] Pawn::LookForMonsters()

Sat, 19 Nov 2005 14:35:10

Crimson Wizard

I suppose there is a mistake in Pawn::LookForMonsters() function. In FOREACH loop there is no condition for 'mo' = null (I believe it can be null in some cases). I tried to make a monster that acts as an ally for player and he uses LookForMonsters() in his overriden function A_Look(), and when I place him on map and launch it, game crashed; until I put to LookForMonsters in FOREACH loop additional condition:
if ( !mo ) continue;
and then it worked.
Sat, 19 Nov 2005 15:29:32

Janis Legzdinsh

It can't be null. Look at the FOREACH definition in common/utils.vc.
Sun, 20 Nov 2005 13:36:48

Crimson Wizard

Huh, seems then that I mistaken. Or it was something depending on machine. First I tested it on ThinkPad, then it didn't worked, but when I tested it on PC it did.

Back to the Vavoom Forum Archives