mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-19 07:31:03 +00:00
- gameinput.h: For PlayerAngle
struct, add extra addadjustment()
overloads to remove type conversions game-side, and when incoming.
This commit is contained in:
parent
35845a63e2
commit
2341ed4e25
1 changed files with 36 additions and 0 deletions
|
@ -114,6 +114,18 @@ struct PlayerAngle
|
|||
rotscrnang = orotscrnang;
|
||||
}
|
||||
|
||||
void addadjustment(int value)
|
||||
{
|
||||
if (!cl_syncinput)
|
||||
{
|
||||
adjustment += BAngToBAM(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
ang += buildang(value);
|
||||
}
|
||||
}
|
||||
|
||||
void addadjustment(double value)
|
||||
{
|
||||
if (!cl_syncinput)
|
||||
|
@ -126,6 +138,30 @@ struct PlayerAngle
|
|||
}
|
||||
}
|
||||
|
||||
void addadjustment(lookangle value)
|
||||
{
|
||||
if (!cl_syncinput)
|
||||
{
|
||||
adjustment += value.asbam();
|
||||
}
|
||||
else
|
||||
{
|
||||
ang += bamang(value.asbam());
|
||||
}
|
||||
}
|
||||
|
||||
void addadjustment(binangle value)
|
||||
{
|
||||
if (!cl_syncinput)
|
||||
{
|
||||
adjustment += value.asbam();
|
||||
}
|
||||
else
|
||||
{
|
||||
ang += value;
|
||||
}
|
||||
}
|
||||
|
||||
void resetadjustment()
|
||||
{
|
||||
adjustment = 0;
|
||||
|
|
Loading…
Reference in a new issue