View Full Version : Say Stats Bug
Jessen
4th April 2003, 10:35
Hey, I have a little say stats bug. Instead of saying
"Johnny5 killed me with a bitegun"
It says:
"Johnny5 killed me with a itegun"
Notice the missing B, it does this for every weapon. The first letter is mysteriously missing. Obviously it detects the Weapon name, but it cuts off the first letter, any ideas?
R4iZ3R
4th April 2003, 14:09
Umm did u make an array of chars to save the weapon and then instead of beginning with 0 u began with 1?(in some function or loop)
o({})o
4th April 2003, 14:41
Is this a script or a program?
Da BuzZ
4th April 2003, 15:14
It's an ogc tweak...
Jessen
4th April 2003, 20:58
struct DeathInfos{
DeathInfos():active(false) {}
bool active;
float from[3];
float to[3];
string killerName;
string weaponName;
string victimName;
};
USER_MSG_INTERCEPT(DeathMsg)
{
updateLocalPlayer();
//DeathMsg: [B]Killer [B]Victim [B]Headshot [S]Weapon Name
BEGIN_READ( pbuf, iSize );
int x = displayCenterX*2 + 1;
int y = displayCenterY*2 + 100;
int killer = READ_BYTE();
int victim = READ_BYTE();
int headshot = READ_BYTE();
char* weaponName = READ_STRING();
if(ax!=-1)
{
PlayerInfo& theKiller = vPlayers[ax];
float* from = theKiller.getEnt()->curstate.origin;
float* to = me.pmEyePos;
VectorCopy(from,deathInfos.from);
VectorCopy(to,deathInfos.to);
if( theKiller.getEnt()->curstate.usehull ) deathInfos.from[2]+=12.1f;
else deathInfos.from[2]+=17.1f;
deathInfos.killerName = vPlayers[ax].entinfo.name;
deathInfos.weaponName = weaponName;
deathInfos.active = true;
}
{
sprintf(tmp,"say %s killed me with a %s he still has %i HP! | ( JessenNS %s )",deathInfos.killerName.c_str(),deathInfos.weaponNa me.c_str(),vPlayers[killer].hitpoints*10,JESSEN_NSVERS);
gEngfuncs.pfnClientCmd(tmp);
}
Jessen
5th April 2003, 21:43
Anybody, this is the only bug so far in my hack, lol I need it fixed :P
Powered by vBulletin™ Version 4.0.2 Copyright © 2010 vBulletin Solutions, Inc. All rights reserved.