mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- gameinput.h: For PlayerAngle
struct, add int settarget()
overload and change one true call with a float to bvectangf()
.
This commit is contained in:
parent
ea4ad0548a
commit
3b3e926fd3
2 changed files with 15 additions and 1 deletions
|
@ -167,6 +167,20 @@ struct PlayerAngle
|
|||
adjustment = 0;
|
||||
}
|
||||
|
||||
void settarget(int value, bool backup = false)
|
||||
{
|
||||
if (!cl_syncinput)
|
||||
{
|
||||
target = value << BAMBITS;
|
||||
if (target == 0) target += 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ang = buildang(value);
|
||||
if (backup) oang = ang;
|
||||
}
|
||||
}
|
||||
|
||||
void settarget(double value, bool backup = false)
|
||||
{
|
||||
if (!cl_syncinput)
|
||||
|
|
|
@ -7223,7 +7223,7 @@ domovethings(void)
|
|||
// auto tracking mode for single player multi-game
|
||||
if (numplayers <= 1 && PlayerTrackingMode && pnum == screenpeek && screenpeek != myconnectindex)
|
||||
{
|
||||
Player[screenpeek].angle.settarget(FixedToFloat(gethiq16angle(Player[myconnectindex].posx - Player[screenpeek].posx, Player[myconnectindex].posy - Player[screenpeek].posy)));
|
||||
Player[screenpeek].angle.settarget(bvectangf(Player[myconnectindex].posx - Player[screenpeek].posx, Player[myconnectindex].posy - Player[screenpeek].posy));
|
||||
}
|
||||
|
||||
if (!TEST(pp->Flags, PF_DEAD))
|
||||
|
|
Loading…
Reference in a new issue