SERVER: Remove isFacing experiement

This commit is contained in:
Steam Deck User 2023-02-07 13:24:46 -05:00
parent 578fa2d44e
commit dfa9313eb9
2 changed files with 2 additions and 23 deletions

View file

@ -546,27 +546,6 @@ void(string modelname) Precache_Set = // Precache model, and set myself to it
setmodel(self, modelname);
};
float(entity who, entity target) isFacing =
{
float who_angle = who.angles_y;
float target_angle = target.angles_y;
float difference_angle = target_angle - who_angle;
#ifndef FTE
if (difference_angle < -45) {
difference_angle += 360;
}
#endif
// 180 = directly facing each other, 30 degree buffer.
if (difference_angle <= 210 && difference_angle >= 150)
return true;
return false;
}
float() crandom =
{
return 2*(random() - 0.5);

View file

@ -402,7 +402,7 @@ void() ReviveGoAway =
//
void() touch_perk =
{
if (other.classname != "player" || other.downed || other.isBuying == true || !isFacing(other, self))
if (other.classname != "player" || other.downed || other.isBuying == true)
return;
// If we're proned and the map permits, collect some spare change
@ -1904,7 +1904,7 @@ void PapUpgrade(entity pap, entity buyer) {
void touch_pap() {
if (other.classname != "player" || other.downed || !isFacing(other, self)) {
if (other.classname != "player" || other.downed ||) {
return;
}