Skip to content

Expose horizontal model flipping to QC#420

Open
Toodles2You wants to merge 1 commit intofte-team:masterfrom
Toodles2You:qc-xflip
Open

Expose horizontal model flipping to QC#420
Toodles2You wants to merge 1 commit intofte-team:masterfrom
Toodles2You:qc-xflip

Conversation

@Toodles2You
Copy link
Copy Markdown
Contributor

Lets QC set the Quake II render flag that flips models for left-handed weapons. pr_dumpplatform defines RF_XFLIP. Spoike currently recommends using RF_USEAXIS to flip models but, that requires a custom shader to disable face culling. I figured this was easier and cleaner.

static void() addviewmodel =
{
	float hand = getplayerkeyfloat (player_localnum, "hand");

	if (hand == 2)
		return;

	viewmodel.modelindex = getstatf (STAT_WEAPONMODELI);

	if (!viewmodel.modelindex)
		return;

	viewmodel.frame = getstatf (STAT_WEAPONFRAME);

	if (hand == 1)
		viewmodel.renderflags |= RF_XFLIP;
	else
		viewmodel.renderflags &= ~RF_XFLIP;

	addentity (viewmodel);
}

@Xylemon Xylemon added enhancement New feature or request FTEQCC For issues regarding the language, compiler, or its IDE labels Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request FTEQCC For issues regarding the language, compiler, or its IDE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants