summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorRitabrata Das <[email protected]>2025-03-04 15:55:34 +0530
committerRitabrata Das <[email protected]>2025-03-04 15:55:34 +0530
commit19ac5fec99c54086f52a17b254e98b37192a9627 (patch)
treef3def749b770a9aac2944a48829c06d3de2d63b5 /plugins
parent4c59fc24b86fda2e317f4fce77eea7a11ff87e30 (diff)
Complete crash on ground plugin and some api changes
Diffstat (limited to 'plugins')
-rw-r--r--plugins/crash_on_ground.py9
-rw-r--r--plugins/radar.py2
2 files changed, 9 insertions, 2 deletions
diff --git a/plugins/crash_on_ground.py b/plugins/crash_on_ground.py
index fb9d080..4cc334b 100644
--- a/plugins/crash_on_ground.py
+++ b/plugins/crash_on_ground.py
@@ -1,6 +1,6 @@
# This plugin renders the dead plane until crashes in ground
# Thus disabling mid air dispawning when dead
-from lib.PacketManager.packets import FSNETCMD_REMOVEAIRPLANE, FSNETCMD_READBACK
+from lib.PacketManager.packets import FSNETCMD_REMOVEAIRPLANE, FSNETCMD_READBACK, FSNETCMD_GETDAMAGE
ENABLED = True
@@ -11,6 +11,7 @@ class Plugin:
def register(self, plugin_manager):
self.plugin_manager = plugin_manager
#self.plugin_manager.register_hook('on_unjoin', self.on_death)
+ #self.plugin_manager.register_hook('on_add_object_server', self.on_join)
self.plugin_manager.register_hook('on_remove_airplane_server', self.on_death)
def on_death(self, data, player, message_to_client, message_to_server):
@@ -18,6 +19,12 @@ class Plugin:
if player.aircraft.id == FSNETCMD_REMOVEAIRPLANE(data).object_id:
return True
else:
+ decode = FSNETCMD_REMOVEAIRPLANE(data)
+ b = FSNETCMD_GETDAMAGE.encode(decode.object_id, 1, 1,
+ player.aircraft.id, 10000,
+ 11, 0, True)
+ message_to_client.append(b)
+ message_to_server.append(b)
a = FSNETCMD_READBACK.encode(2, player.aircraft.id, True)
message_to_server.append(a)
return False
diff --git a/plugins/radar.py b/plugins/radar.py
index 7636dc4..e09447d 100644
--- a/plugins/radar.py
+++ b/plugins/radar.py
@@ -9,7 +9,7 @@ import struct
import traceback
ENABLED = True
-RADIUS = 5000 # in meters, within this range planes with different IFF can see each other.
+RADIUS = 9000 # in meters, within this range planes with different IFF can see each other.
flying_players = {}