generated from Persson-dev/Godot-Xmake
fixed client player going crazy on spawn
This commit is contained in:
@@ -32,9 +32,9 @@ class World : public godot::Node3D, public protocol::PacketHandler {
|
||||
float m_PassedTime;
|
||||
|
||||
|
||||
void AddPlayer(PlayerID a_PlayerId, godot::String a_PlayerName);
|
||||
void RemovePlayer(PlayerID a_PlayerId);
|
||||
void SetPlayerPositionAndRotation(
|
||||
virtual void AddPlayer(PlayerID a_PlayerId, godot::String a_PlayerName);
|
||||
virtual void RemovePlayer(PlayerID a_PlayerId);
|
||||
virtual void SetPlayerPositionAndRotation(
|
||||
PlayerID a_PlayerId, const godot::Vector3& a_Position, const godot::Vector3& a_Rotation, const godot::Vector3& a_Velocity);
|
||||
};
|
||||
} // namespace blitz
|
||||
@@ -20,7 +20,7 @@ class Player : public godot::CharacterBody3D {
|
||||
Player();
|
||||
~Player();
|
||||
|
||||
void _ready();
|
||||
void _ready() override;
|
||||
virtual void _physics_process(float delta);
|
||||
void animate(float delta);
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@ class ServerWorld : public World {
|
||||
void HandlePacket(const protocol::packets::PlayerPositionAndRotation&) override;
|
||||
|
||||
void SyncPlayersPos();
|
||||
|
||||
protected:
|
||||
virtual void AddPlayer(PlayerID a_PlayerId, godot::String a_PlayerName);
|
||||
};
|
||||
|
||||
} // namespace blitz
|
||||
Reference in New Issue
Block a user