Freyr Posted January 20, 2004 Share Posted January 20, 2004 What is the best way to determine if an entity is an NPC? Is it if (ent->NPC) { //is NPC } else { //isn't NPC } Link to comment Share on other sites More sharing options...
[ONE]Mushroom Posted January 20, 2004 Share Posted January 20, 2004 That works, so does... if ( ent->s.eType == ET_NPC ) I seem to have used both in JMMod without any trouble. To be honest, I don't know why you would choose one over the other. Both are used in the SDK, maybe each is used by different programmers. You might also want (for example) if ( ent->client->NPC_class == CLASS_VEHICLE ) Link to comment Share on other sites More sharing options...
Freyr Posted January 20, 2004 Author Share Posted January 20, 2004 It was more of a curiosity question mostly to see how everyone else does it, thanks for the reply though. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.