Page 1 of 1

PlayerState_s

Posted: Mon Jan 05, 2009 2:23 pm
by Rawing
In the comment for PlayerState_s it says, you can't modify it without modifying msg.c too. Can anyone tell me where msg.c is located?? I can't find it in the QuakeIIIArena folder. :confused:

Re: PlayerState_s

Posted: Mon Jan 05, 2009 8:03 pm
by AnthonyJ
It's in the engine source-code (quake3.exe). In general, if you're just making a mod, you cannot add/change the items in playerState_t.

Re: PlayerState_s

Posted: Tue Jan 06, 2009 8:23 am
by Rawing
That's kinda bad :offended: However, I'll add something to MAX_STATS, but that doesn't really help alot.

Re: PlayerState_s

Posted: Tue Jan 06, 2009 9:10 am
by AnthonyJ
You cannot increase MAX_STATS either, as that will change the size of the ps.stats[] array, and you won't have recompiled the engine with the update.

Re: PlayerState_s

Posted: Tue Jan 06, 2009 3:03 pm
by Rawing
I've added STAT_PLAYERHEAL, STAT_MEDKITS and STAT_FALLINGDAMAGE till now and all three work perfectly :)

Re: PlayerState_s

Posted: Tue Jan 06, 2009 3:26 pm
by ^misantropia^
Yep, you can add a few extra stats to the enum (but no more than eight or nine or you'll overflow the stats[] array).

Re: PlayerState_s

Posted: Thu Jan 08, 2009 4:44 pm
by Rawing
Yeah, I've seen that :) it mustn't go over 16 fields...
Anyone here already manipulated msg.c? I've tried some exe unpackers but no one worked till now... Do you know one that works for quake3.exe?

Re: PlayerState_s

Posted: Fri Jan 09, 2009 7:46 am
by AnthonyJ
Rawing wrote:I've tried some exe unpackers but no one worked till now... Do you know one that works for quake3.exe?
No, you need to build quake3.exe from the source-code - eg the official 1.32b GPL'd source-code release from id, or the updated version from ioquake3.

Note that if you simply want to up the MAX_STATS constant and rebuild quake3.exe with the updated code (so that you can have up to 32 stats), you'll probably want my patch to msg.c (which is in ioquake3).

Re: PlayerState_s

Posted: Fri Jan 09, 2009 3:02 pm
by ^misantropia^
It was all hard-coded? Sloppy, Id, sloppy!