Skip to content

Commit

Permalink
Customize Opponent Color Count
Browse files Browse the repository at this point in the history
  • Loading branch information
KcRobin9 committed Mar 6, 2024
1 parent 65e560f commit 7950e6c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code/midtown/mmai/aiVehicleOpponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ define_dummy_symbol(mmai_aiVehicleOpponent);
#include "aiGoalFollowWayPts.h"
#include "aiGoalStop.h"

static mem::cmd_param PARAM_opponent_color_count {"colorcount"};

void aiVehicleOpponent::DrawDamage()
{}

Expand All @@ -38,7 +40,7 @@ void aiVehicleOpponent::Init(i32 opp_id, aiRaceData* race_data, char* race_name)
if (agiRQ.TextureQuality)
--agiRQ.TextureQuality;

i32 paint_job = opp_id & 3;
i32 paint_job = opp_id % PARAM_opponent_color_count.get_or(4);
i32 index = opp_id + 1;

OpponentRaceData* opp = static_cast<OpponentRaceData*>(race_data->Opponents.Access(index));
Expand Down

0 comments on commit 7950e6c

Please sign in to comment.