PDA

View Full Version : Healing can be hacked


superman
05-24-2007, 11:39 PM
ver 1.6.3
windows
single iwd
CTF SERVER

Well, found an interesting bug today. I was just wondering if anyone else is having the same issue, as when a player is hurt and bleeding, and if one of their buddies comes to heal the player that is hurt and bleeding, that it begins giving actual SCORE points to the TOTAL score per their team. Although, yes it will gives 1 point per health healing to the player that healed the hurt player, it will still give an actual score point.

So, say your limit is 10 score points in CTF to win the game, well with this health method, you can have 11 score points or more within 1 minute of the game actually starting.

So, players could easily change the maps forever, just by healing one of their hurt buddies.

Not really sure if this is a code bug, but I am positive that all my cfg's are configured correct. Besides, I doubt anything in the CFG could cause this type of conflict, although maybe I am missing something in the cfg files that relates to this, but I don't see anything that would cause this from the CFG files.

Anybody have any ideas?

Which files should I look through to find this bug?

superman
05-25-2007, 12:03 AM
Geez, I hate when I make a post, and then I go and look for the bug, only to maybe find it 2 seconds later...

Ok, I believe the bug is located at:

firstaid
LN 252-255

But, I need confirmation, I am running tests right now to make sure this was what was causing it, as I am not sure.

If the bug is not taking care of, any CTF server that uses points via health structure could be in jeopardy, as when players do figure it out, the players could easily change maps via this method and could possibly control any server.

Now, I am still NOT sure if I am overlooking a cfg setting, maybe I didn't see the point via health structure, if I did, I would surely want to shut that off, because it is causing Team Scores.

Not sure if LN 252-255 was for a reason or for a specific gametype either, as if this is a bug, then these lines may not be the best thing for ctf or any server.

Please let me know, thanks.

richman
05-25-2007, 11:57 AM
nice find superman and thx for the heads up...we haven't played ctf in a while but I'll try to test this out as well.

Marc.
05-25-2007, 12:16 PM
i guess you can comment out the 3 lines for the teamscore to prevent this.

teamscore = getTeamScore(self.pers["team"]);
teamscore++;
setTeamScore(self.pers["team"], teamscore);


if my memory serves me right this was inserted (a looooooong time ago) to reward players for helping out other (injured)players to give more TEAMPLAY

most of the time its everyone for themselves while its a TEAMBASED gametype
if one gets a point for helping out another they tend to do this more often..so the teamworks gets enhanced..instead of the hell with you....im going my own way sort of thinking

so altho i dont see this as a bug...i do understand the potential danger of it...where indeed lameasses are constantly doing this and ruin the game for everyone.


perhaps this is a way to control it:

else
{
level.ex_health_score = [[level.drm_cvardef]]("ex_healthscore", 0, 0, 1, "int");

iprintln(&"FIRSTAID_APPLIED_TEAM_MSG1",self.ex_targetplayer);
iprintln(&"FIRSTAID_APPLIED_TEAM_MSG2", self);
self playSound("health_pickup_medium");
if(level.ex_health_score)
{
self.score++;
teamscore = getTeamScore(self.pers["team"]);
teamscore++;
setTeamScore(self.pers["team"], teamscore);
}
}


or if you dont mind playerscore as long it doesnt add to the teamscore:

else
{
level.ex_health_score = [[level.drm_cvardef]]("ex_healthscore", 0, 0, 1, "int");

iprintln(&"FIRSTAID_APPLIED_TEAM_MSG1",self.ex_tar getplayer);
iprintln(&"FIRSTAID_APPLIED_TEAM_MSG2", self);
self playSound("health_pickup_medium");
self.score++;
if(level.ex_health_score)
{
teamscore = getTeamScore(self.pers["team"]);
teamscore++;
setTeamScore(self.pers["team"], teamscore);
}
}


and set in cfg file:

set ex_healthscore "1" to give score or 0 to disable the score (// = default = disabled)

oh and at the utter top of the gsc file : #include extreme\_drm;
just to be sure

lemme know if this works

superman
05-25-2007, 02:09 PM
holy crap, thats awesome Marc!

I will try the bottom one first, only because, the idea is to get away from teamscores, although, yes I do like the self score idea. Great idea. I suppose with self score, it just sets it to +1 pt, kinda wish there was a way to set up in gametypes for us to configure an actual amount for the self score that we feel the player deserves.

I like the cvar idea, great job, at least if it doesn't work, then we can easily just shut it off. It also offers some servers to consider turning this feature off anyways, because maybe they feel that the player should want to do it out of kindness anyways. Although, lets not forget that there is a config setting for turning off the ability to heal others. But, definitely a great new addition marc... I bet the eXtreme+ mod authors, never thought that one out, LOL.

I'll give this drm code a shot... hope it works, well... it should work...

Hopefully others might test this too.

Thanks so much marc, very cool!

superman
05-25-2007, 10:48 PM
Ok, I tried the bottom code marc that you provided and at first there was a misprint in your code:

it is suppose to be targetplayer); and not tar getplayer);.

But that doesn't matter, the code didn't work. Seems that many pieces
of the code are relying heavly on this section of the firstaid code, and if you include this drm part of the code, many other pieces like LN 321 might need converted to DRM, not sure... I'm not even sure if I know what I'm talking about, LOL... All I know is that the DRM part of the code that marc provided does NOT work, hopefully we might see other marc driven updates to the firstaid gsc file soon, to sort of take care of this problem.

For now, I have just slashed out the last 3 lines that I mentioned, and I am still running tests, hoping that this has temporarily fixed this. I hope that we see updates in the near future that might take care of first aid team scores.

Thanks so much for the help guys!