QSS-M icon indicating copy to clipboard operation
QSS-M copied to clipboard

Feature request: cvars for rotating models

Open KillianMiles opened this issue 7 months ago • 4 comments

Proposing model rotation cvars. "scr_rotate_model" cvar takes three floats and a model list string - to define angular velocity (avelocity) vector, then each model listed in the "string" will be shown rotating at that avelocity.

scr_rotatemodel1 (float x, float y, float z, string model_list)
scr_rotatemodel2
scr_rotatemodel3
scr_rotatemodel4
scr_rotatemodel5

e.g. scr_rotate_model3 250 50 125 "progs/model1.mdl, progs/model2.mdl" will cause every instance of model1.mdl and model2.mdl to appear rotating at angular velocity '250 50 125'

KillianMiles avatar May 24 '25 01:05 KillianMiles

the scr_rotatemodel models rotate about twice as fast on ctf_teardown_r1 map than on all other maps teadown has rotating bmodels in it, and while its not the only map with rotating bmodels - its the only one that has the scr_rotatemodel bug

KillianMiles avatar Aug 20 '25 00:08 KillianMiles

In QuakeC you can set .avelocity and get rotating models -- just pointing this out.

Baker7 avatar Aug 22 '25 01:08 Baker7

Quake doesnt network avelocity field for alias models. So in multiplayer games -- instead, it winds up sending angles vector to every client every network frame. That is what this feature allows to avoid

KillianMiles avatar Aug 27 '25 20:08 KillianMiles

Makes sense. cl_main.c:CL_RelinkEntities ...

This is where the spinning is applied for ground weapons and such in QSS-M ...

// rotate binary objects locally
		if (modelflags & EF_ROTATE)
		{ 
			ent->angles[1] = bobjrotate;
			if (cl_bobbing.value) // woods (joequake #weaponbob)
				ent->origin[2] += sin(bobjrotate / 90 * M_PI) * 5 + 5;
		}

That would be a good place to apply the fake avelocity. Note that "cl_bobbing 1" makes the ground models move up and down like Quake 3 in addition to spinning.

Baker7 avatar Aug 27 '25 21:08 Baker7