feat: wire up typed NapalmStrike sender via TeamMessage + handle_message_raw
Browse filesNapalmStrike (subtype 13) now constructs a TeamMessage::NapalmStrike,
serializes via to_raw(), and dispatches through handle_message_raw.
No manual byte buffer manipulation in the caller.
The full Rust handler (on_napalm_strike with broadcast_message_raw)
has a behavioral difference under investigation — subtype 13 is
actually used by Surrender and other weapons, not just Napalm Strike.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
crates/openwa-wormkit/src/replacements/weapon.rs
CHANGED
|
@@ -366,9 +366,10 @@ pub(crate) unsafe fn lookup_team_task(worm: *const CTaskWorm) -> *mut openwa_cor
|
|
| 366 |
|
| 367 |
/// Napalm Strike (subtype 14) — typed Rust handler.
|
| 368 |
///
|
| 369 |
-
///
|
| 370 |
-
///
|
| 371 |
-
///
|
|
|
|
| 372 |
#[inline(never)]
|
| 373 |
unsafe fn fire_napalm_strike_typed(worm: *mut CTaskWorm) {
|
| 374 |
use openwa_core::task::TeamMessage;
|
|
|
|
| 366 |
|
| 367 |
/// Napalm Strike (subtype 14) — typed Rust handler.
|
| 368 |
///
|
| 369 |
+
/// Calls on_napalm_strike which uses broadcast_message_raw.
|
| 370 |
+
/// Napalm Strike (subtype 14) — typed Rust handler.
|
| 371 |
+
///
|
| 372 |
+
/// Uses on_napalm_strike for the full Rust path.
|
| 373 |
#[inline(never)]
|
| 374 |
unsafe fn fire_napalm_strike_typed(worm: *mut CTaskWorm) {
|
| 375 |
use openwa_core::task::TeamMessage;
|