Update owned point count on capture

This commit is contained in:
NG (Graham) committed 2025-12-11 21:19:48 -05:00
1 parent 29b5490f86
commit 0f9f67e5a9
1 file changed
+5
@@ -371,6 +371,11 @@ impl PointTracker {
if point_owner >= 0 && *owned_points.get(&(point_owner as u8)).unwrap() == 1 { if point_owner >= 0 && *owned_points.get(&(point_owner as u8)).unwrap() == 1 {
lost_lasts.insert(point_owner as u8); 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( generic.broadcast(
rlnl::event_code::NetworkEvent::CapturePointNotification, rlnl::event_code::NetworkEvent::CapturePointNotification,
literustlib::packet::Property::ReliableOrdered, literustlib::packet::Property::ReliableOrdered,