Skip to content

Commit 442c138

Browse files
authored
Create Get_Player_Calculated_Scale_By_Distance.cpp
1 parent efe82b2 commit 442c138

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
float GetPlayerCalculatedScaleByDistance(int distance){
2+
if(distance <= 300.0f){
3+
return 1.0f;
4+
}
5+
if(distance >= 1000.0f){
6+
return 0.5f;
7+
}
8+
float dist = distance - 300;
9+
float oran = dist / 700 * 0.4;
10+
return 1.0f - oran;
11+
}

0 commit comments

Comments
 (0)