1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Update owned point count on capture

This commit is contained in:
NG (Graham)
2025-12-11 21:19:38 -05:00
parent 29b5490f86
commit 0f9f67e5a9

View File

@@ -371,6 +371,11 @@ impl PointTracker {
if point_owner >= 0 && *owned_points.get(&(point_owner as u8)).unwrap() == 1 {
lost_lasts.insert(point_owner as u8);
}
// in case 2+ points are captured in the same tick
*owned_points.get_mut(&(new_team as u8)).unwrap() += 1;
if point_owner >= 0 {
*owned_points.get_mut(&(point_owner as u8)).unwrap() -= 1;
}
generic.broadcast(
rlnl::event_code::NetworkEvent::CapturePointNotification,
literustlib::packet::Property::ReliableOrdered,