diff --git a/README.md b/README.md index 6d628d1b3..eca8feafd 100644 --- a/README.md +++ b/README.md @@ -223,7 +223,7 @@ Goals: * [ ] Support textures/*/*_glow.png load from ReRelease, * [ ] Support tactile/*/*.bnvib/.wav feedback load from ReRelease, * [ ] Fix physics with incorrect floor height in psx/base0.bsp, -* [ ] Fix strange white flying boxes in psx/base0.bsp, +* [x] Fix strange white flying boxes in psx/base0.bsp, * [x] RGB particles support instead palette based one, * [x] Get rid of VID_PaletteColor client internal api use, * [x] Broken maps groups from base2 to next, diff --git a/src/game/g_misc.c b/src/game/g_misc.c index 1c8de7643..247b84cfe 100644 --- a/src/game/g_misc.c +++ b/src/game/g_misc.c @@ -2645,6 +2645,7 @@ SP_misc_flare(edict_t* ent) ent->s.modelindex2 = st.fade_start_dist; ent->s.modelindex3 = st.fade_end_dist; + ent->s.skinnum = st.rgba; if (ent->targetname) { diff --git a/src/game/g_spawn.c b/src/game/g_spawn.c index cc3850b60..05e662174 100644 --- a/src/game/g_spawn.c +++ b/src/game/g_spawn.c @@ -113,11 +113,27 @@ DynamicSpawnUpdate(edict_t *self, dynamicentity_t *data) VectorCopy(data->mins, self->mins); VectorCopy(data->maxs, self->maxs); - self->monsterinfo.scale = ( - data->scale[0] + - data->scale[1] + - data->scale[2] - ) / 3; + /* has updated scale */ + if (st.scale[0] || st.scale[1] || st.scale[2]) + { + /* copy to other parts if zero */ + if (!st.scale[1]) + { + st.scale[1] = st.scale[0]; + } + + if (!st.scale[2]) + { + st.scale[2] = st.scale[0]; + } + + /* Copy to entity scale field */ + VectorCopy(st.scale, self->s.scale); + } + else + { + VectorCopy(data->scale, self->s.scale); + } } void @@ -492,6 +508,7 @@ ED_ParseField(const char *key, const char *value, edict_t *ent) *(char **)(b + f->ofs) = ED_NewString(value, false); break; case F_VECTOR: + VectorClear(vec); sscanf(value, "%f %f %f", &vec[0], &vec[1], &vec[2]); ((float *)(b + f->ofs))[0] = vec[0]; ((float *)(b + f->ofs))[1] = vec[1]; diff --git a/src/game/savegame/tables/fields.h b/src/game/savegame/tables/fields.h index d31046d38..b3323cfaa 100644 --- a/src/game/savegame/tables/fields.h +++ b/src/game/savegame/tables/fields.h @@ -58,7 +58,9 @@ {"origin", FOFS(s.origin), F_VECTOR}, {"angles", FOFS(s.angles), F_VECTOR}, {"angle", FOFS(s.angles), F_ANGLEHACK}, -{"rgba", FOFS(s.skinnum), F_RGBA}, +{"rgb", STOFS(rgba), F_RGBA, FFL_SPAWNTEMP}, +{"rgba", STOFS(rgba), F_RGBA, FFL_SPAWNTEMP}, +{"scale", STOFS(scale), F_VECTOR, FFL_SPAWNTEMP}, {"radius", STOFS(radius), F_FLOAT, FFL_SPAWNTEMP}, {"fade_start_dist", STOFS(fade_start_dist), F_FLOAT, FFL_SPAWNTEMP}, {"fade_end_dist", STOFS(fade_end_dist), F_FLOAT, FFL_SPAWNTEMP},