still reverting
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5096 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -849,7 +849,7 @@ void startmap(const char *name, bool reset) // called just after a map load
|
||||
if(!reset) return;
|
||||
|
||||
player1->frags = player1->flagscore = player1->deaths = player1->lifesequence = 0;
|
||||
loopv(players) if(players[i]) players[i]->frags = players[i]->flagscore = players[i]->deaths = players[i]->points = players[i]->lifesequence = 0;
|
||||
loopv(players) if(players[i]) players[i]->frags = players[i]->flagscore = players[i]->deaths = players[i]->lifesequence = 0;
|
||||
if(editmode) toggleedit(true);
|
||||
intermission = false;
|
||||
showscores(false);
|
||||
|
||||
+2
-2
@@ -349,7 +349,7 @@ private:
|
||||
public:
|
||||
int clientnum, lastupdate, plag, ping;
|
||||
int lifesequence; // sequence id for each respawn, used in damage test
|
||||
int frags, flagscore, deaths, points;
|
||||
int frags, flagscore, deaths;
|
||||
int lastaction, lastmove, lastpain, lastvoicecom;
|
||||
int clientrole;
|
||||
bool attacking;
|
||||
@@ -376,7 +376,7 @@ public:
|
||||
|
||||
bool ignored, muted;
|
||||
|
||||
playerent() : curskin(0), clientnum(-1), lastupdate(0), plag(0), ping(0), lifesequence(0), frags(0), flagscore(0), deaths(0), points(0), lastpain(0), lastvoicecom(0), clientrole(CR_DEFAULT),
|
||||
playerent() : curskin(0), clientnum(-1), lastupdate(0), plag(0), ping(0), lifesequence(0), frags(0), flagscore(0), deaths(0), lastpain(0), lastvoicecom(0), clientrole(CR_DEFAULT),
|
||||
team(TEAM_SPECT), spectatemode(SM_NONE), followplayercn(FPCN_VOID), eardamagemillis(0), respawnoffset(0),
|
||||
prevweaponsel(NULL), weaponsel(NULL), nextweaponsel(NULL), primweap(NULL), nextprimweap(NULL), lastattackweapon(NULL),
|
||||
smoothmillis(-1),
|
||||
|
||||
+5
-7
@@ -123,7 +123,7 @@ struct clientstate : playerstate
|
||||
projectilestate<8> grenades;
|
||||
int akimbomillis;
|
||||
bool scoped;
|
||||
int flagscore, frags, teamkills, deaths, shotdamage, damage, points;
|
||||
int flagscore, frags, teamkills, deaths, shotdamage, damage;
|
||||
|
||||
clientstate() : state(CS_DEAD) {}
|
||||
|
||||
@@ -146,7 +146,7 @@ struct clientstate : playerstate
|
||||
grenades.reset();
|
||||
akimbomillis = 0;
|
||||
scoped = false;
|
||||
flagscore = frags = teamkills = deaths = shotdamage = damage = points = 0;
|
||||
flagscore = frags = teamkills = deaths = shotdamage = damage = 0;
|
||||
respawn();
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ struct savedscore
|
||||
{
|
||||
string name;
|
||||
uint ip;
|
||||
int frags, flagscore, deaths, teamkills, shotdamage, damage, team, points;
|
||||
int frags, flagscore, deaths, teamkills, shotdamage, damage, team;
|
||||
bool valid;
|
||||
|
||||
void save(clientstate &cs, int t)
|
||||
@@ -179,7 +179,6 @@ struct savedscore
|
||||
shotdamage = cs.shotdamage;
|
||||
damage = cs.damage;
|
||||
team = t;
|
||||
points = cs.points;
|
||||
valid = true;
|
||||
}
|
||||
|
||||
@@ -191,18 +190,17 @@ struct savedscore
|
||||
cs.teamkills = teamkills;
|
||||
cs.shotdamage = shotdamage;
|
||||
cs.damage = damage;
|
||||
cs.points = points;
|
||||
}
|
||||
};
|
||||
|
||||
struct medals
|
||||
{
|
||||
int lasthit, lastgun, combohits, combo, combotime, combodamage, ncombos, ncovers, nhs;
|
||||
int points, lasthit, lastgun, combohits, combo, combotime, combodamage, ncombos, ncovers, nhs;
|
||||
int ask, askmillis, linked, linkmillis, linkreason;
|
||||
bool updatedpoints;
|
||||
void reset()
|
||||
{
|
||||
lasthit = lastgun = combohits = combo = combotime = combodamage = ncombos = ncovers = nhs = 0;
|
||||
points = lasthit = lastgun = combohits = combo = combotime = combodamage = ncombos = ncovers = nhs = 0;
|
||||
askmillis = linkmillis = 0;
|
||||
linkreason = linked = ask = -1;
|
||||
updatedpoints = false;
|
||||
|
||||
+16
-16
@@ -113,7 +113,7 @@ void checkcombo (client *target, client *actor, int damage, int gun)
|
||||
int mh2c = minhits2combo(gun);
|
||||
if ( actor->md.combohits > mh2c && actor->md.combo < 3 && actor->md.combohits % mh2c == 1 ) {
|
||||
actor->md.combo++;
|
||||
actor->state.points += 10;
|
||||
actor->md.points += 10;
|
||||
actor->md.ncombos++;
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,7 @@ void checkcombo (client *target, client *actor, int damage, int gun)
|
||||
actor->md.combotime+=diffhittime;
|
||||
actor->md.combodamage+=damage;
|
||||
actor->md.combo++;
|
||||
actor->state.points += 10;
|
||||
actor->md.points += 10;
|
||||
actor->md.ncombos++;
|
||||
break;
|
||||
}
|
||||
@@ -218,7 +218,7 @@ inline void testcover(int msg, int factor, client *actor)
|
||||
{
|
||||
if ( a2c < COVERDIST && c2t < COVERDIST && a2t < COVERDIST ) {
|
||||
sendf(actor->clientnum, 1, "ri2", SV_HUDEXTRAS, msg);
|
||||
actor->state.points += factor * clientnumber; /** clientnumber now include the spectators... FIXME */
|
||||
actor->md.points += factor * clientnumber; /** clientnumber now include the spectators... FIXME */
|
||||
actor->md.ncovers++;
|
||||
}
|
||||
}
|
||||
@@ -286,42 +286,42 @@ void checkfrag (client *target, client *actor, int gun, bool gib)
|
||||
{
|
||||
int targethasflag = clienthasflag(target->clientnum);
|
||||
int actorhasflag = clienthasflag(actor->clientnum);
|
||||
target->state.points -= 5;
|
||||
target->md.points -= 5;
|
||||
if(target!=actor) {
|
||||
if(!isteam(target->team, actor->team)) {
|
||||
|
||||
if (m_teammode) {
|
||||
if(!m_flags) actor->state.points += 5 * target->state.points / 100;
|
||||
else actor->state.points += 4 * target->state.points / 100;
|
||||
if(!m_flags) actor->md.points += 5 * target->md.points / 100;
|
||||
else actor->md.points += 4 * target->md.points / 100;
|
||||
|
||||
checkcover (target, actor);
|
||||
if ( m_htf && actorhasflag >= 0 ) actor->state.points += clientnumber;
|
||||
if ( m_htf && actorhasflag >= 0 ) actor->md.points += clientnumber;
|
||||
|
||||
if ( targethasflag >= 0 ) {
|
||||
actor->state.points += 3 * clientnumber;
|
||||
if ( m_htf ) target->state.points -= clientnumber;
|
||||
actor->md.points += 3 * clientnumber;
|
||||
if ( m_htf ) target->md.points -= clientnumber;
|
||||
}
|
||||
}
|
||||
else actor->state.points += 3 * target->state.points / 100;
|
||||
else actor->md.points += 3 * target->md.points / 100;
|
||||
|
||||
if (gib) {
|
||||
if ( gun == GUN_GRENADE ) actor->state.points += 10;
|
||||
if ( gun == GUN_GRENADE ) actor->md.points += 10;
|
||||
else if ( gun == GUN_SNIPER ) {
|
||||
actor->state.points += 15;
|
||||
actor->md.points += 15;
|
||||
actor->md.nhs++;
|
||||
}
|
||||
else if ( gun == GUN_KNIFE ) actor->state.points += 20;
|
||||
else if ( gun == GUN_KNIFE ) actor->md.points += 20;
|
||||
}
|
||||
else actor->state.points += 10;
|
||||
else actor->md.points += 10;
|
||||
|
||||
if ( actor->md.combo ) sendf(actor->clientnum, 1, "ri2", SV_HUDEXTRAS, actor->md.combo > 2 ? HE_MASTERCOMBO : HE_COMBO);
|
||||
|
||||
} else {
|
||||
|
||||
if ( targethasflag >= 0 ) {
|
||||
actor->state.points -= 2 * clientnumber;
|
||||
actor->md.points -= 2 * clientnumber;
|
||||
}
|
||||
else actor->state.points -= 10;
|
||||
else actor->md.points -= 10;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user