Skip to content

Commit

Permalink
Merge remote-tracking branch 'videoP-jaPRO/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bucky21659 committed Oct 21, 2018
2 parents eef9d7e + 26b9892 commit fd6d6b2
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 21 deletions.
2 changes: 1 addition & 1 deletion codemp/game/SpeederNPC.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ static void ProcessMoveCommands( Vehicle_t *pVeh )
}
}
//trap->Print("Prim fire boost\n");
parentPS->gravity = 1;// = pVeh->m_pVehicleInfo->turboSpeed; // Instantly Jump To Turbo Speed
parentPS->gravity = 1;// = pVeh->m_pVehicleInfo->turboSpeed; // Instantly Jump To Turbo Speed gravboost
parentPS->velocity[2] += 50; //RACESWOOP
}
}
Expand Down
2 changes: 1 addition & 1 deletion codemp/game/bg_slidemove.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ qboolean PM_SlideMove( qboolean gravity ) {

// don't change velocity if in a timer (FIXME: is this correct?)
if ( pm->ps->pm_time ) {
VectorCopy( primal_velocity, pm->ps->velocity );
VectorCopy( primal_velocity, pm->ps->velocity ); //corner clip , cornerclip , skim
}

return ( bumpcount != 0 );
Expand Down
21 changes: 12 additions & 9 deletions codemp/game/g_account.c
Original file line number Diff line number Diff line change
Expand Up @@ -2142,10 +2142,10 @@ void Cmd_ACLogin_f( gentity_t *ent ) { //loda fixme show lastip ? or use lastip
Q_strncpyz(ent->client->pers.userName, username, sizeof(ent->client->pers.userName));
if (ent->client->sess.raceMode && ent->client->pers.stats.startTime) {
ResetPlayerTimers(ent, qtrue);
trap->SendServerCommand(ent - g_entities, "print \"Login sucessful. Time reset.\n\"");
//trap->SendServerCommand(ent - g_entities, "print \"Login sucessful. Time reset.\n\"");
}
else
trap->SendServerCommand(ent - g_entities, "print \"Login sucessful.\n\"");
//trap->SendServerCommand(ent - g_entities, "print \"Login sucessful.\n\"");

if (!ip) //meh
ip = lastip;
Expand All @@ -2167,15 +2167,16 @@ void Cmd_ACLogin_f( gentity_t *ent ) { //loda fixme show lastip ? or use lastip

//Problem, only add to flags, not remove?
if ((flags & JAPRO_ACCOUNTFLAG_FULLADMIN) && !(ent->client->sess.accountFlags & JAPRO_ACCOUNTFLAG_FULLADMIN)) {
if (Q_stricmp(g_fullAdminMsg.string, ""))
trap->SendServerCommand(-1, va("print \"%s ^7%s\n\"", ent->client->pers.netname, g_fullAdminMsg.string));
trap->SendServerCommand(-1, va("print \"%s^7 (%s) has logged in %s\n\"", ent->client->pers.netname, ent->client->pers.userName, g_fullAdminMsg.string));
ent->client->sess.accountFlags |= JAPRO_ACCOUNTFLAG_FULLADMIN;
}
else if ((flags & JAPRO_ACCOUNTFLAG_JRADMIN) && !(ent->client->sess.accountFlags & JAPRO_ACCOUNTFLAG_JRADMIN)) {
if (Q_stricmp(g_juniorAdminMsg.string, ""))
trap->SendServerCommand(-1, va("print \"%s ^7%s\n\"", ent->client->pers.netname, g_juniorAdminMsg.string));
trap->SendServerCommand(-1, va("print \"%s^7 (%s) has logged in %s\n\"", ent->client->pers.netname, ent->client->pers.userName, g_juniorAdminMsg.string));
ent->client->sess.accountFlags |= JAPRO_ACCOUNTFLAG_JRADMIN;
}
else {
trap->SendServerCommand(-1, va("print \"%s^7 (%s) has logged in\n\"", ent->client->pers.netname, ent->client->pers.userName));
}
if (flags & JAPRO_ACCOUNTFLAG_IPLOCK)
ent->client->sess.accountFlags |= JAPRO_ACCOUNTFLAG_IPLOCK;
if (flags & JAPRO_ACCOUNTFLAG_TRUSTED)
Expand Down Expand Up @@ -2693,6 +2694,7 @@ void Svcmd_ListAdmins_f(void)
int s;
unsigned int flags;
char adminString[16];
int row = 1;

CALL_SQLITE(open(LOCAL_DB_PATH, &db));

Expand All @@ -2709,7 +2711,8 @@ void Svcmd_ListAdmins_f(void)
Q_strncpyz(adminString, "Full", sizeof(adminString));
else if (flags & 16)
Q_strncpyz(adminString, "Junior", sizeof(adminString));
Com_Printf(va(" %-18s %s\n", (char*)sqlite3_column_text(stmt, 0), adminString));
Com_Printf(va("^5%2i^3: ^3%-18s %s^7\n", row, (char*)sqlite3_column_text(stmt, 0), adminString));
row++;
}
else if (s == SQLITE_DONE) {
break;
Expand Down Expand Up @@ -3311,10 +3314,10 @@ void Cmd_ACLogout_f( gentity_t *ent ) { //If logged in, print logout msg, remove
ent->client->pers.stats.racetime = 0.0f;
}

Q_strncpyz(ent->client->pers.userName, "", sizeof(ent->client->pers.userName));
//ent->client->pers.unlocks = 0;
//ent->client->sess.accountFlags = 0;
trap->SendServerCommand(ent-g_entities, "print \"Logged out.\n\"");
trap->SendServerCommand(-1, va("print \"%s^7 (%s) has logged out\n\"", ent->client->pers.netname, ent->client->pers.userName));
Q_strncpyz(ent->client->pers.userName, "", sizeof(ent->client->pers.userName));
}
else
trap->SendServerCommand(ent-g_entities, "print \"You are not logged in!\n\"");
Expand Down
4 changes: 2 additions & 2 deletions codemp/game/g_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -2338,9 +2338,9 @@ qboolean ClientUserinfoChanged( int clientNum ) { //I think anything treated as
client->pers.showChatCP = qfalse;

if (atoi(s) & JAPRO_PLUGIN_CONSOLECP)
client->pers.showConsoleCP = qfalse;
else
client->pers.showConsoleCP = qtrue;
else
client->pers.showConsoleCP = qfalse;

if (atoi(s) & JAPRO_PLUGIN_NODMGNUMBERS)
client->pers.noDamageNumbers = qtrue;
Expand Down
32 changes: 26 additions & 6 deletions codemp/game/g_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -4984,9 +4984,10 @@ void Cmd_Amlogin_f(gentity_t *ent)
return;
ent->client->sess.accountFlags &= ~JAPRO_ACCOUNTFLAG_JRADMIN;
ent->client->sess.accountFlags |= JAPRO_ACCOUNTFLAG_FULLADMIN;
trap->SendServerCommand(ent - g_entities, "print \"^2You are now logged in with full admin privileges.\n\"");
if (Q_stricmp(g_fullAdminMsg.string, ""))
trap->SendServerCommand(-1, va("print \"%s ^7%s\n\"", ent->client->pers.netname, g_fullAdminMsg.string));
if (Q_stricmp(g_fullAdminMsg.string, "")) //Ok, so just set this to " " if you want it to print the normal login msg, or set it to "" to skip. or "with junior admin" for more info.. etc
trap->SendServerCommand(-1, va("print \"%s^7 has logged in %s\n\"", ent->client->pers.netname, g_fullAdminMsg.string));
else
trap->SendServerCommand(ent - g_entities, "print \"^2You are now logged in with full admin privileges.\n\"");
return;
}
if (!Q_stricmp(pass, g_juniorAdminPass.string))
Expand All @@ -4995,9 +4996,10 @@ void Cmd_Amlogin_f(gentity_t *ent)
return;
ent->client->sess.accountFlags |= JAPRO_ACCOUNTFLAG_JRADMIN;
ent->client->sess.accountFlags &= ~JAPRO_ACCOUNTFLAG_FULLADMIN;
trap->SendServerCommand(ent - g_entities, "print \"^2You are now logged in with junior admin privileges.\n\"");
if (Q_stricmp(g_juniorAdminMsg.string, ""))
trap->SendServerCommand(-1, va("print \"%s ^7%s\n\"", ent->client->pers.netname, g_juniorAdminMsg.string));
trap->SendServerCommand(-1, va("print \"%s^7 has logged in %s\n\"", ent->client->pers.netname, g_juniorAdminMsg.string));
else
trap->SendServerCommand(ent - g_entities, "print \"^2You are now logged in with junior admin privileges.\n\"");
return;
}
else
Expand Down Expand Up @@ -7244,7 +7246,7 @@ void Cmd_RaceTele_f(gentity_t *ent)
if (clientid == -1 || clientid == -2)
return;

if (g_entities[clientid].client->pers.noFollow) {
if (g_entities[clientid].client->pers.noFollow || g_entities[clientid].client->sess.sessionTeam == TEAM_SPECTATOR) {
if ((ent->client->sess.accountFlags & JAPRO_ACCOUNTFLAG_FULLADMIN) && !(g_fullAdminLevel.integer & (1 << A_SEEHIDDEN)))
return; //Print msg?
else if ((ent->client->sess.accountFlags & JAPRO_ACCOUNTFLAG_JRADMIN) && !(g_juniorAdminLevel.integer & (1 << A_SEEHIDDEN)))
Expand Down Expand Up @@ -7418,6 +7420,15 @@ void Cmd_Amtele_f(gentity_t *ent)
if (clientid1 == -1 || clientid1 == -2)
return;

if (g_entities[clientid1].client->pers.noFollow || g_entities[clientid1].client->sess.sessionTeam == TEAM_SPECTATOR) {
if ((ent->client->sess.accountFlags & JAPRO_ACCOUNTFLAG_FULLADMIN) && !(g_fullAdminLevel.integer & (1 << A_SEEHIDDEN)))
return; //Print msg?
else if ((ent->client->sess.accountFlags & JAPRO_ACCOUNTFLAG_JRADMIN) && !(g_juniorAdminLevel.integer & (1 << A_SEEHIDDEN)))
return;
else
return;
}

origin[0] = g_entities[clientid1].client->ps.origin[0];
origin[1] = g_entities[clientid1].client->ps.origin[1];
origin[2] = g_entities[clientid1].client->ps.origin[2] + 96;
Expand All @@ -7435,6 +7446,15 @@ void Cmd_Amtele_f(gentity_t *ent)
if (clientid1 == -1 || clientid1 == -2 || clientid2 == -1 || clientid2 == -2)
return;

if (g_entities[clientid2].client->pers.noFollow || g_entities[clientid2].client->sess.sessionTeam == TEAM_SPECTATOR) {
if ((ent->client->sess.accountFlags & JAPRO_ACCOUNTFLAG_FULLADMIN) && !(g_fullAdminLevel.integer & (1 << A_SEEHIDDEN)))
return; //Print msg?
else if ((ent->client->sess.accountFlags & JAPRO_ACCOUNTFLAG_JRADMIN) && !(g_juniorAdminLevel.integer & (1 << A_SEEHIDDEN)))
return;
else
return;
}

if (g_entities[clientid1].client && (g_entities[clientid1].client->sess.accountFlags & JAPRO_ACCOUNTFLAG_FULLADMIN) || ((ent->client->sess.accountFlags & JAPRO_ACCOUNTFLAG_JRADMIN) && (g_entities[clientid1].client->sess.accountFlags & JAPRO_ACCOUNTFLAG_JRADMIN)))//He has admin
{
if (g_entities[clientid1].client->ps.clientNum != ent->client->ps.clientNum)//Hes not me
Expand Down
2 changes: 1 addition & 1 deletion codemp/game/g_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -1633,7 +1633,7 @@ void TimerCheckpoint(gentity_t *trigger, gentity_t *player, trace_t *trace) {//J
if (player->client->pers.showCenterCP)
trap->SendServerCommand( player-g_entities, va("cp \"^3%.3fs^5, avg ^3%i^5u, max ^3%i^5u\n\n\n\n\n\n\n\n\n\n\"", (float)time * 0.001f, average, (int)(player->client->pers.stats.topSpeed + 0.5f)));
if (player->client->pers.showConsoleCP)
trap->SendServerCommand(player - g_entities, va("print \"^3%.3fs^5, avg ^3%i^5u, max ^3%i^5u\n\n\n\n\n\n\n\n\n\n\"", (float)time * 0.001f, average, (int)(player->client->pers.stats.topSpeed + 0.5f)));
trap->SendServerCommand(player - g_entities, va("print \"^5Checkpoint: ^3%.3f^5, avg ^3%i^5, max ^3%i^5 ups\n\"", (float)time * 0.001f, average, (int)(player->client->pers.stats.topSpeed + 0.5f)));
else if (player->client->pers.showChatCP)
trap->SendServerCommand( player-g_entities, va("chat \"^5Checkpoint: ^3%.3f^5, avg ^3%i^5, max ^3%i^5 ups\"", (float)time * 0.001f, average, (int)(player->client->pers.stats.topSpeed + 0.5f)));

Expand Down
2 changes: 1 addition & 1 deletion codemp/game/g_weapon.c
Original file line number Diff line number Diff line change
Expand Up @@ -3867,7 +3867,7 @@ static void WP_FireConcussionAlt( gentity_t *ent )
qboolean hitDodged = qfalse;
vec3_t shot_mins, shot_maxs;
int i;
const int shove = -400 * g_selfDamageScale.integer;
const int shove = -400 * g_selfDamageScale.value; //this seems like a dumb idea though?
qboolean ghoul2 = qfalse;

//[JAPRO - Serverside - Weapons - Tweak weapons Buff Conc alt - Start]
Expand Down

0 comments on commit fd6d6b2

Please sign in to comment.