mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 18:15:28 -04:00
Fix last commit
This commit is contained in:
parent
c7fd3a05f9
commit
35ad6372ff
14
src/Entity.c
14
src/Entity.c
@ -952,10 +952,18 @@ cc_bool LocalPlayer_CheckCanZoom(struct LocalPlayer* p) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void LocalPlayer_MoveToSpawn(struct LocalPlayer* p, struct LocationUpdate* update) {
|
||||
p->Base.VTABLE->SetLocation(&p->Base, update);
|
||||
void LocalPlayers_MoveToSpawn(struct LocationUpdate* update) {
|
||||
struct LocalPlayer* p;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < Game_NumLocalPlayers; i++)
|
||||
{
|
||||
p = &LocalPlayer_Instances[i];
|
||||
p->Base.VTABLE->SetLocation(&p->Base, update);
|
||||
}
|
||||
|
||||
/* TODO: This needs to be before new map... */
|
||||
Camera.CurrentPos = Camera.Active->GetPosition(p, 0.0f);
|
||||
Camera.CurrentPos = Camera.Active->GetPosition(Entities.CurPlayer, 0.0f);
|
||||
}
|
||||
|
||||
void LocalPlayer_CalcDefaultSpawn(struct LocalPlayer* p, struct LocationUpdate* update) {
|
||||
|
@ -253,7 +253,7 @@ void LocalPlayer_SetInterpPosition(struct LocalPlayer* p, float t);
|
||||
void LocalPlayer_ResetJumpVelocity(struct LocalPlayer* p);
|
||||
cc_bool LocalPlayer_CheckCanZoom(struct LocalPlayer* p);
|
||||
/* Moves local player back to spawn point. */
|
||||
void LocalPlayer_MoveToSpawn(struct LocalPlayer* p, struct LocationUpdate* update);
|
||||
void LocalPlayers_MoveToSpawn(struct LocationUpdate* update);
|
||||
void LocalPlayer_CalcDefaultSpawn(struct LocalPlayer* p, struct LocationUpdate* update);
|
||||
|
||||
cc_bool LocalPlayer_HandleRespawn(struct LocalPlayer* p);
|
||||
|
@ -87,7 +87,7 @@ cc_result Map_LoadFrom(const cc_string* path) {
|
||||
|
||||
World_SetNewMap(World.Blocks, World.Width, World.Height, World.Length);
|
||||
if (!spawn_point) LocalPlayer_CalcDefaultSpawn(Entities.CurPlayer, &update);
|
||||
LocalPlayer_MoveToSpawn(&LocalPlayer_Instances[0], &update);
|
||||
LocalPlayers_MoveToSpawn(&update);
|
||||
|
||||
relPath = *path;
|
||||
Utils_UNSAFE_GetFilename(&relPath);
|
||||
|
@ -284,9 +284,6 @@ cc_bool Game_ValidateBitmapPow2(const cc_string* file, struct Bitmap* bmp) {
|
||||
void Game_UpdateDimensions(void) {
|
||||
Game.Width = max(Window_Main.Width, 1);
|
||||
Game.Height = max(Window_Main.Height, 1);
|
||||
|
||||
Gfx.ViewportWidth = Game.Width;
|
||||
Gfx.ViewportHeight = Game.Height;
|
||||
}
|
||||
|
||||
static void Game_OnResize(void* obj) {
|
||||
|
@ -2004,7 +2004,7 @@ static void GeneratingScreen_EndGeneration(void) {
|
||||
World.Seed = Gen_Seed;
|
||||
|
||||
LocalPlayer_CalcDefaultSpawn(Entities.CurPlayer, &update);
|
||||
LocalPlayer_MoveToSpawn(&LocalPlayer_Instances[0], &update);
|
||||
LocalPlayers_MoveToSpawn(&update);
|
||||
}
|
||||
|
||||
static void GeneratingScreen_Update(void* screen, double delta) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user