Mantis 0000008:

o All sayings now have a cooldown time of 3 seconds, to prevent saying-spam

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@64 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
tankefugl 2005-04-11 18:29:08 +00:00
parent 53ffbebd81
commit 55afe37a78

View file

@ -1373,6 +1373,9 @@ bool AvHPlayer::ExecuteMessage(AvHMessageID inMessageID, bool inInstantaneous, b
if ((dotResult > 0.9f) && (dotResult > currentResult)) if ((dotResult > 0.9f) && (dotResult > currentResult))
{ {
TraceResult theTrace; TraceResult theTrace;
vec3_t vecFrom = AvHSHUGetRealLocation(this->pev->origin, this->pev->mins, this->pev->maxs);
vec3_t vecTo = AvHSHUGetRealLocation(theEntity->pev->origin, theEntity->pev->mins, theEntity->pev->maxs);
UTIL_TraceLine(this->pev->origin, theEntity->pev->origin, dont_ignore_monsters, NULL, &theTrace); UTIL_TraceLine(this->pev->origin, theEntity->pev->origin, dont_ignore_monsters, NULL, &theTrace);
if (theTrace.flFraction == 1.0f) if (theTrace.flFraction == 1.0f)
{ {
@ -1400,11 +1403,6 @@ bool AvHPlayer::ExecuteMessage(AvHMessageID inMessageID, bool inInstantaneous, b
} }
END_FOR_ALL_ENTITIES(kAvHPlayerClassName); END_FOR_ALL_ENTITIES(kAvHPlayerClassName);
// Send icon number only to players on the same team
// TODO 0000992:
// Perform a trace to find nearest player in crosshair
// Send issued order to found player
} }
// Common messages here // Common messages here
@ -3715,7 +3713,12 @@ void AvHPlayer::ValidateClientMoveEvents()
case SAYING_7: case SAYING_7:
case SAYING_8: case SAYING_8:
case SAYING_9: case SAYING_9:
if(GetGameRules()->GetCheatsEnabled() || (gpGlobals->time > (this->mTimeOfLastSaying + kMinSayingInterval))) // tankefugl: 0000008
// preventing spamming of request and ack
case ORDER_REQUEST:
case ORDER_ACK:
// :tankefugl
if(GetGameRules()->GetCheatsEnabled() || (gpGlobals->time > (this->mTimeOfLastSaying + kMinSayingInterval)))
{ {
theIsValid = true; theIsValid = true;
} }
@ -3748,8 +3751,11 @@ void AvHPlayer::ValidateClientMoveEvents()
switch(theMessageID) switch(theMessageID)
{ {
// Validate orders // Validate orders
case ORDER_REQUEST: // tankefugl: 0000008
case ORDER_ACK: // preventing spamming of request and ack
//case ORDER_REQUEST:
//case ORDER_ACK:
// :tankefugl
// Validate weapon switches // Validate weapon switches
case WEAPON_NEXT: case WEAPON_NEXT: