- Joined
- Jan 19, 2014
- Messages
- 136
- Reaction score
- 126
Google Translate.
It may seem like something stupid. But some people suffer from this protection when someone shoots you and you retaliate and gain no reputation. Do not HATE it if it does not help you, but I'm sure it will help someone.
Search for:
Leave like this:
Now, search:
Change all for:
Comment all code:
Like This
Comment on all searches:
Comment:
Search for
Like this:
It may seem like something stupid. But some people suffer from this protection when someone shoots you and you retaliate and gain no reputation. Do not HATE it if it does not help you, but I'm sure it will help someone.
Search for:
Code:
if(diffRep < 0 && (r3dGetTime() < targetPlr->m_AggressionTimeUntil))if(diffRep < 0 && (r3dGetTime() < targetPlr->m_AggressionTimeUntil))
Leave like this:
Code:
/*if(diffRep < 0 && (r3dGetTime() < targetPlr->m_AggressionTimeUntil))
{
// do not do anything to fromPlr reputation. Target player had aggression timer on him, so our player is OK killing him without penalty
}
else*/
//{
fromPlr->loadout_->Stats.Reputation = newRep;
if(diffRep != 0)
{
PKT_S2C_AddScore_s n;
n.ID = 0;
n.XP = 0;
n.GD = 0;
n.Rep = diffRep;
p2pSendToPeer(fromPlr->peerId_, fromPlr, &n, sizeof(n));
}
//}
Now, search:
Code:
// agro effect. if player agroed neutral or good player, he will get flagged and that will allow
Change all for:
Code:
// agro effect. if player agroed neutral or good player, he will get flagged and that will allow anyone to kill him without penalty to their reputation
/*if(IsServerPlayer(fromObj) && damage > 0 && r3dGetTime() > m_AggressionTimeUntil) // and player doesn't have agro timer on him already
{
int AgroRepEffect = 0;
{
int newRep = gServerLogic.getReputationKillEffect(IsServerPlayer(fromObj)->loadout_->Stats.Reputation, loadout_->Stats.Reputation);
if((newRep - IsServerPlayer(fromObj)->loadout_->Stats.Reputation)<0) // negative effect
{
IsServerPlayer(fromObj)->m_AggressionTimeUntil = r3dGetTime() + 15*60.0f; // 15 min timer
}
}
}*/
//r3dOutToLog("%s damaged by %s by %.1f points, %.1f left\n", userName, fromObj->Name.c_str(), damage, m_Health);
Comment all code:
Code:
if(IsServerPlayer(fromObj) && damage > 0 && r3dGetTime() > m_AggressionTimeUntil) // and player doesn't have agro timer on him already
{
int AgroRepEffect = 0;
{
int newRep = gServerLogic.getReputationKillEffect(IsServerPlayer(fromObj)->loadout_->Stats.Reputation, loadout_->Stats.Reputation);
if((newRep - IsServerPlayer(fromObj)->loadout_->Stats.Reputation)<0) // negative effect
{
IsServerPlayer(fromObj)->m_AggressionTimeUntil = r3dGetTime() + 15*60.0f; // 15 min timer
}
}
}
Like This
Code:
/*if(IsServerPlayer(fromObj) && damage > 0 && r3dGetTime() > m_AggressionTimeUntil) // and player doesn't have agro timer on him already
{
int AgroRepEffect = 0;
{
int newRep = gServerLogic.getReputationKillEffect(IsServerPlayer(fromObj)->loadout_->Stats.Reputation, loadout_->Stats.Reputation);
if((newRep - IsServerPlayer(fromObj)->loadout_->Stats.Reputation)<0) // negative effect
{
IsServerPlayer(fromObj)->m_AggressionTimeUntil = r3dGetTime() + 15*60.0f; // 15 min timer
}
}
}
*/
Comment on all searches:
Code:
m_AggressionTimeUntil = 0;
Comment:
Code:
float m_AggressionTimeUntil; // time until player has aggresion timer on him (means anyone can kill him without reputation penalty)
Search for
Code:
if(diffRep < 0 && (r3dGetTime() < targetPlr->m_AggressionTimeUntil))
Like this:
Code:
/*if(diffRep < 0 && (r3dGetTime() < targetPlr->m_AggressionTimeUntil))
{
// do not do anything to fromPlr reputation. Target player had aggression timer on him, so our player is OK killing him without penalty
}
else
{*/
fromPlr->loadout_->Stats.Reputation = newRep;
if(diffRep != 0)
{
PKT_S2C_AddScore_s n;
n.ID = 0;
n.XP = 0;
n.GD = 0;
n.Rep = diffRep;
p2pSendToPeer(fromPlr->peerId_, fromPlr, &n, sizeof(n));
}
//}