mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-11 08:36:38 -04:00
Use Vec3_Create3 less and avoid creating screenshots directory for webclient
This commit is contained in:
parent
d0f21a24b8
commit
d496d87de6
@ -497,9 +497,7 @@ void Game_TakeScreenshot(void) {
|
||||
#else
|
||||
struct Stream stream;
|
||||
#endif
|
||||
|
||||
Game_ScreenshotRequested = false;
|
||||
if (!Utils_EnsureDirectory("screenshots")) return;
|
||||
DateTime_CurrentLocal(&now);
|
||||
|
||||
String_InitArray(filename, fileBuffer);
|
||||
@ -520,6 +518,7 @@ void Game_TakeScreenshot(void) {
|
||||
#elif CC_BUILD_MINFILES
|
||||
/* no screenshots for these systems */
|
||||
#else
|
||||
if (!Utils_EnsureDirectory("screenshots")) return;
|
||||
String_InitArray(path, pathBuffer);
|
||||
String_Format1(&path, "screenshots/%s", &filename);
|
||||
|
||||
|
@ -775,7 +775,7 @@ static void ChatScreen_UpdateChatYOffsets(struct ChatScreen* s) {
|
||||
}
|
||||
|
||||
static void ChatScreen_OnInputTextChanged(void* elem) {
|
||||
ChatScreen_UpdateChatYOffsets(Gui_Chat);
|
||||
ChatScreen_UpdateChatYOffsets(&ChatScreen_Instance);
|
||||
}
|
||||
|
||||
static cc_string ChatScreen_GetChat(int i) {
|
||||
@ -1422,7 +1422,7 @@ static int InventoryScreen_KeyDown(void* screen, int key) {
|
||||
Gui_Remove((struct Screen*)s);
|
||||
} else if (Elem_HandlesKeyDown(table, key)) {
|
||||
} else {
|
||||
return Elem_HandlesKeyDown(&Gui_HUD->hotbar, key);
|
||||
return Elem_HandlesKeyDown(&HUDScreen_Instance.hotbar, key);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -283,12 +283,12 @@ float Respawn_HighestSolidY(struct AABB* bb) {
|
||||
}
|
||||
|
||||
Vec3 Respawn_FindSpawnPosition(float x, float z, Vec3 modelSize) {
|
||||
Vec3 spawn = Vec3_Create3(x, 0.0f, z);
|
||||
Vec3 spawn;
|
||||
struct AABB bb;
|
||||
float highestY;
|
||||
int y;
|
||||
|
||||
spawn.Y = World.Height + ENTITY_ADJUSTMENT;
|
||||
Vec3_Set(spawn, x, World.Height + ENTITY_ADJUSTMENT, z);
|
||||
AABB_Make(&bb, &spawn, &modelSize);
|
||||
spawn.Y = 0.0f;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user