mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 11:35:08 -04:00
Fix C client decoding .fcm maps incorrectly
This commit is contained in:
parent
9380fb71db
commit
174e429f3a
@ -463,7 +463,9 @@ ReturnCode Bitmap_DecodePng(struct Bitmap* bmp, struct Stream* stream) {
|
|||||||
if (transparentCol <= PNG_RGB_MASK) {
|
if (transparentCol <= PNG_RGB_MASK) {
|
||||||
Png_ComputeTransparency(bmp, transparentCol);
|
Png_ComputeTransparency(bmp, transparentCol);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bmp->Scan0 == NULL) ErrorHandler_Fail("Invalid PNG image");
|
if (bmp->Scan0 == NULL) ErrorHandler_Fail("Invalid PNG image");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ void Fcm_Load(struct Stream* stream) {
|
|||||||
struct LocalPlayer* p = &LocalPlayer_Instance;
|
struct LocalPlayer* p = &LocalPlayer_Instance;
|
||||||
p->Spawn.X = Stream_ReadI32_LE(stream) / 32.0f;
|
p->Spawn.X = Stream_ReadI32_LE(stream) / 32.0f;
|
||||||
p->Spawn.Y = Stream_ReadI32_LE(stream) / 32.0f;
|
p->Spawn.Y = Stream_ReadI32_LE(stream) / 32.0f;
|
||||||
p->Spawn.Z = Stream_ReadI16_LE(stream) / 32.0f;
|
p->Spawn.Z = Stream_ReadI32_LE(stream) / 32.0f;
|
||||||
p->SpawnRotY = Math_Packed2Deg(Stream_ReadU8(stream));
|
p->SpawnRotY = Math_Packed2Deg(Stream_ReadU8(stream));
|
||||||
p->SpawnHeadX = Math_Packed2Deg(Stream_ReadU8(stream));
|
p->SpawnHeadX = Math_Packed2Deg(Stream_ReadU8(stream));
|
||||||
|
|
||||||
|
@ -166,6 +166,7 @@ ReturnCode Zip_Extract(struct ZipState* state) {
|
|||||||
if (sig != ZIP_SIG_LOCALFILEHEADER) return ZIP_ERR_INVALID_LOCAL_DIR;
|
if (sig != ZIP_SIG_LOCALFILEHEADER) return ZIP_ERR_INVALID_LOCAL_DIR;
|
||||||
Zip_ReadLocalFileHeader(state, entry);
|
Zip_ReadLocalFileHeader(state, entry);
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user