Skip to content

Commit

Permalink
swars: Divided BHeight field in Thing Object data
Browse files Browse the repository at this point in the history
Name of the field should be changed as well. Maybe later.
  • Loading branch information
mefistotelis committed Apr 29, 2024
1 parent 2ef15c0 commit 95d5995
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/thing.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ struct TngUObject
short TNode;
short Cost;
short Shite;
int BHeight;
short BHeightA;
short BHeightB;
ushort Turn;
ushort TurnPadOnPS;
short tnode[4];
Expand Down
4 changes: 2 additions & 2 deletions src/vehtraffic.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ void process_vehicle_stop_for_pedestrians(struct Thing *p_vehicle)
{
if (p_vehicle->State == VehSt_UNKN_32 || p_vehicle->State == VehSt_UNKN_11)
{
if ((p_tnode->Flags & 0x40) != 0)
if ((p_tnode->Flags & 0x0040) != 0)
{
p_vehicle->U.UVehicle.ReqdSpeed = 0;
p_gate = &things[p_tnode->GateLink];
Expand All @@ -251,7 +251,7 @@ void process_vehicle_stop_for_pedestrians(struct Thing *p_vehicle)
p_tztnode->Flags &= 0x0040;
p_vehicle->U.UVehicle.WorkPlace &= ~0x0040;
}
if (p_gate->U.UObject.BHeight >> 16 == p_vehicle->U.UVehicle.TNode)
if (p_gate->U.UObject.BHeightB == p_vehicle->U.UVehicle.TNode)
{
p_tztnode->GateLink = 0;
p_tztnode->Flags &= ~0x0040;
Expand Down

0 comments on commit 95d5995

Please sign in to comment.