PlayerState_s

Locked
Rawing
Posts: 107
Joined: Tue Oct 23, 2007 1:40 pm

PlayerState_s

Post 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:
[color=#FF0000]/callvote kick all_enemies[/color]
AnthonyJ
Posts: 130
Joined: Wed Nov 15, 2006 7:51 pm

Re: PlayerState_s

Post 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.
Rawing
Posts: 107
Joined: Tue Oct 23, 2007 1:40 pm

Re: PlayerState_s

Post by Rawing »

That's kinda bad :offended: However, I'll add something to MAX_STATS, but that doesn't really help alot.
[color=#FF0000]/callvote kick all_enemies[/color]
AnthonyJ
Posts: 130
Joined: Wed Nov 15, 2006 7:51 pm

Re: PlayerState_s

Post 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.
Rawing
Posts: 107
Joined: Tue Oct 23, 2007 1:40 pm

Re: PlayerState_s

Post by Rawing »

I've added STAT_PLAYERHEAL, STAT_MEDKITS and STAT_FALLINGDAMAGE till now and all three work perfectly :)
[color=#FF0000]/callvote kick all_enemies[/color]
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: PlayerState_s

Post 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).
Rawing
Posts: 107
Joined: Tue Oct 23, 2007 1:40 pm

Re: PlayerState_s

Post 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?
[color=#FF0000]/callvote kick all_enemies[/color]
AnthonyJ
Posts: 130
Joined: Wed Nov 15, 2006 7:51 pm

Re: PlayerState_s

Post 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).
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: PlayerState_s

Post by ^misantropia^ »

It was all hard-coded? Sloppy, Id, sloppy!
Locked