Merge pull request #4 from DrBeef/TBDC

TBDC Scales in Code
This commit is contained in:
Simon Brown 2023-04-06 16:54:01 +01:00 committed by GitHub
commit 67b7d26de8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 106 additions and 2319 deletions

View file

@ -22,6 +22,21 @@
#define TBDC_SABER_BOUNCETIME 200
#define TBDC_SABER_BOUNCEANGLE 90
//SCALES
#define TBDC_SCALE_STOFFICER 102
#define TBDC_SCALE_STOFFICERALT 102
#define TBDC_SCALE_STCOMMANDER 103
#define TBDC_SCALE_IMPERIAL 101
#define TBDC_SCALE_IMPERIALOFFICER 102
#define TBDC_SCALE_IMPERIALCOMMANDER 103
#define TBDC_SCALE_REBORN 102
#define TBDC_SCALE_REBORNFORCEUSER 102
#define TBDC_SCALE_REBORNBOSS 103
#define TBDC_SCALE_REBORNACROBAT 102
typedef enum {
// Invalid, or saber not armed
VRLS_NONE = 0,

View file

@ -27,6 +27,8 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
#include "b_local.h"
#include "b_public.h"
#include "anims.h"
#include <JKXR/VrTBDC.h>
extern cvar_t *g_TeamBeefDirectorsCut;
extern qboolean NPCsPrecached;
extern vec3_t playerMins;
@ -1082,6 +1084,51 @@ qboolean NPC_ParseParms( const char *NPCName, gentity_t *NPC )
NPCName = "Player";
}
//Override scale due to TBDC
if(g_TeamBeefDirectorsCut->value)
{
if(!Q_stricmp( NPCName, "STOfficer" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_STOFFICER /100.0f;
}
else if(!Q_stricmp( NPCName, "STOfficerAlt" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_STOFFICERALT /100.0f;
}
else if(!Q_stricmp( NPCName, "STCommander" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_STOFFICERALT /100.0f;
}
else if(!Q_stricmp( NPCName, "Imperial" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_IMPERIAL /100.0f;
}
else if(!Q_stricmp( NPCName, "ImpOfficer" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_IMPERIALOFFICER /100.0f;
}
else if(!Q_stricmp( NPCName, "ImpCommander" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_IMPERIALCOMMANDER /100.0f;
}
else if(!Q_stricmp( NPCName, "RebornAcrobat" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_REBORNACROBAT /100.0f;
}
else if(!Q_stricmp( NPCName, "Reborn" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_REBORN /100.0f;
}
else if(!Q_stricmp( NPCName, "RebornForceUser" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_REBORNFORCEUSER /100.0f;
}
else if(!Q_stricmp( NPCName, "RebornFencer" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_REBORNBOSS /100.0f;
}
}
if ( NPC->NPC )
{
stats = &NPC->NPC->stats;
@ -1221,6 +1268,50 @@ qboolean NPC_ParseParms( const char *NPCName, gentity_t *NPC )
if ( !Q_stricmp( token, "}" ) )
{
//Override scale due to TBDC
if(g_TeamBeefDirectorsCut->value)
{
if(!Q_stricmp( NPCName, "STOfficer" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_STOFFICER /100.0f;
}
else if(!Q_stricmp( NPCName, "STOfficerAlt" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_STOFFICERALT /100.0f;
}
else if(!Q_stricmp( NPCName, "STCommander" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_STOFFICERALT /100.0f;
}
else if(!Q_stricmp( NPCName, "Imperial" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_IMPERIAL /100.0f;
}
else if(!Q_stricmp( NPCName, "ImpOfficer" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_IMPERIALOFFICER /100.0f;
}
else if(!Q_stricmp( NPCName, "ImpCommander" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_IMPERIALCOMMANDER /100.0f;
}
else if(!Q_stricmp( NPCName, "RebornAcrobat" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_REBORNACROBAT /100.0f;
}
else if(!Q_stricmp( NPCName, "Reborn" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_REBORN /100.0f;
}
else if(!Q_stricmp( NPCName, "RebornForceUser" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_REBORNFORCEUSER /100.0f;
}
else if(!Q_stricmp( NPCName, "RebornFencer" ))
{
NPC->s.modelScale[0] = NPC->s.modelScale[1] = NPC->s.modelScale[2] = TBDC_SCALE_REBORNBOSS /100.0f;
}
}
break;
}
//===MODEL PROPERTIES===========================================================

File diff suppressed because it is too large Load diff