Exemplo n.º 1
0
def resend_tool(player):
    set_tool = loaders.SetTool()
    set_tool.player_id = player.player_id
    set_tool.value = player.tool
    if player.weapon_object.shoot:
        player.protocol.broadcast_contained(set_tool)
    else:
        player.send_contained(set_tool)
Exemplo n.º 2
0
import textwrap

from twisted.internet import reactor
import enet

from pyspades.protocol import BaseConnection
from pyspades.constants import *
from pyspades.packet import call_packet_handler, register_packet_handler
from pyspades import contained as loaders
from pyspades.collision import vector_collision, collision_3d
from pyspades import world
from pyspades.common import Vertex3, get_color, make_color
from pyspades.weapon import WEAPONS
from pyspades.mapgenerator import ProgressiveMapGenerator

set_tool = loaders.SetTool()
block_action = loaders.BlockAction()
position_data = loaders.PositionData()
restock = loaders.Restock()
create_player = loaders.CreatePlayer()
intel_pickup = loaders.IntelPickup()
intel_capture = loaders.IntelCapture()
intel_drop = loaders.IntelDrop()
player_left = loaders.PlayerLeft()
set_hp = loaders.SetHP()
existing_player = loaders.ExistingPlayer()
kill_action = loaders.KillAction()
chat_message = loaders.ChatMessage()
map_data = loaders.MapChunk()
map_start = loaders.MapStart()
state_data = loaders.StateData()