And that too. -----Original Message----- From: Leon Hartwig [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 6:30 PM To: '[EMAIL PROTECTED]' Subject: RE: [hlcoders] Confusing bit of code in the HL AI
ASSERT() in the HL SDK will actually just print a message to the console (when your have compiled in Debug mode), such as: ASSERT FAILED: <whatever> > -----Original Message----- > From: Adrian Finol [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 06, 2002 6:27 PM > To: '[EMAIL PROTECTED]' > Subject: RE: [hlcoders] Confusing bit of code in the HL AI > > > That code sets the COND_ENEMY_OCCLUDE flag if the enemy is > NOT visible. > Hence the !FVisible. If it's visible, then it removes the flag. > > Assert is a debug function, it will break (stop) the debugger if the > condition passed is not met. > > -----Original Message----- > From: geoff c [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 06, 2002 6:22 PM > To: [EMAIL PROTECTED] > Subject: [hlcoders] Confusing bit of code in the HL AI > > > ladies and gentlemen of the jury, please direct your attention towards > monsters.cpp, line 1065: > if ( !FVisible( pEnemy ) ) > { > ASSERT(!HasConditions(bits_COND_SEE_ENEMY)); > SetConditions( bits_COND_ENEMY_OCCLUDED ); > } > else > ClearConditions( bits_COND_ENEMY_OCCLUDED ); > > I looked up the definition for ASSERT, which was #define ASSERT(f) . I > don't know what that does so it scares me. > > Am I correct in guessing that the above snippet of code checks (if the > enemy is visible) if the monster currently sees the enemy, > and if so, turns > COND_ENEMY_OCCLUDED on? And what would that be used for, and why? > > AI confuses me. > > -geoff c > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list > archives, please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

