Skip to content

Commit

Permalink
Remaster merge commit 'f856be35'
Browse files Browse the repository at this point in the history
  • Loading branch information
0lvin committed Nov 22, 2024
2 parents 99c7418 + f856be3 commit 611f3ac
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/game/g_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
27 changes: 22 additions & 5 deletions src/game/g_spawn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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];
Expand Down
4 changes: 3 additions & 1 deletion src/game/savegame/tables/fields.h
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit 611f3ac

Please sign in to comment.