CPP := cc -xc -E
QCC ?= ../../../../gmqcc/gmqcc
+QCCIDENT ?= -DGMQCC
PROGS_OUT ?= ..
WORKDIR ?= ../.tmp
export QCC
export QCCDEFS
export QCCFLAGS
+export QCCIDENT
$(PROGS_OUT)/csprogs.dat: client/progs.inc $(QCCVERSIONFILE) | $(WORKDIR)
@ echo make[1]: Entering directory \`$(CURDIR)/client\'
entity pl1 = players.sort_next;
entity pl2 = pl1.sort_next;
- string pl1_name = (pl1 && pl1.team != NUM_SPECTATOR ? entcs_GetName(pl1.sv_entnum) : "???");
- string pl2_name = (pl2 && pl2.team != NUM_SPECTATOR ? entcs_GetName(pl2.sv_entnum) : "???");
+ string pl1_name = ((pl1 && pl1.team != NUM_SPECTATOR) ? entcs_GetName(pl1.sv_entnum) : "???");
+ string pl2_name = ((pl2 && pl2.team != NUM_SPECTATOR) ? entcs_GetName(pl2.sv_entnum) : "???");
if(pl1_name == prev_pl1_name && pl2_name == prev_pl2_name)
return; // Players haven't changed, stop here
{
discrete_acceleration = acceleration;
// workaround for ftos_decimals returning a negative 0
- if(discrete_acceleration > -1 / (10 ** acc_decimals) && discrete_acceleration < 0)
+ if(discrete_acceleration > -1 / pow(10, acc_decimals) && discrete_acceleration < 0)
discrete_acceleration = 0;
discrete_speed = speed;
physics_update_time += autocvar_hud_panel_physics_update_interval;
// distribution display
distribution = me.(scores(ps_primary)) - pl.(scores(ps_primary));
- distrtimer = ftos_decimals(fabs(distribution/(10 ** TIME_DECIMALS)), TIME_DECIMALS);
+ distrtimer = ftos_decimals(fabs(distribution/pow(10, TIME_DECIMALS)), TIME_DECIMALS);
if (distribution <= 0) {
distribution_color = '0 1 0';
mv_selection = MapVote_Selection(pos, dist, rows, mv_columns);
if (mv_top2_time)
- mv_top2_alpha = max(0.2, 1 - (time - mv_top2_time) ** 2);
+ mv_top2_alpha = max(0.2, pow(1 - (time - mv_top2_time), 2));
void (vector, float, float, string, string, float, float) DrawItem;
current_zoomfraction = (current_viewzoom - 1) / (1/zoomfactor - 1);
if(zoomsensitivity < 1)
- setsensitivityscale(current_viewzoom ** (1 - zoomsensitivity));
+ setsensitivityscale(pow(current_viewzoom, (1 - zoomsensitivity)));
else
setsensitivityscale(1);
{
float t = (time - blurtest_time0) / (blurtest_time1 - blurtest_time0);
float r = t * blurtest_radius;
- float f = 1 / (t ** blurtest_power) - 1;
+ float f = 1 / pow(t, blurtest_power) - 1;
cvar_set("r_glsl_postprocess", "1");
cvar_set("r_glsl_postprocess_uservec1", strcat(ftos(r), " ", ftos(f), " 0 0"));
rpn_setf(f2 - f * floor(f2 / f));
} else if(rpncmd == "pow" || rpncmd == "**") {
f = rpn_popf();
- rpn_setf(rpn_getf() ** f);
+ rpn_setf(pow(rpn_getf(), f));
} else if(rpncmd == "bitand" || rpncmd == "&") {
f = rpn_popf();
rpn_setf(rpn_getf() & f);
// If teamate is not frozen still seek them out as fight better
// in a group.
best_dist2 = vlen2(it.origin - org);
- if (best_dist2 < 700 ** 2)
+ if (best_dist2 < pow(700, 2))
{
best_pl = NULL;
best_dist2 = 0; // already close to a teammate
f = key.team;
else
f = 30;
- s |= (32 ** key.count) * f;
+ s |= pow(32, key.count) * f;
}
FOREACH_CLIENT(true, { STAT(OBJECTIVE_STATUS, it) = s; });
FOR_EACH_KH_KEY(key)
{
if(key.owner)
- STAT(OBJECTIVE_STATUS, key.owner) |= (32 ** key.count) * 31;
+ STAT(OBJECTIVE_STATUS, key.owner) |= pow(32, key.count) * 31;
}
//print(ftos((nextent(NULL)).kh_state), "\n");
}
if(!this.absolute)
{
v = this.maxs - this.mins;
- this.impulse *= -v.x * v.y * v.z / (64**3); // relative: particles per 64^3 cube
+ this.impulse *= -v.x * v.y * v.z / pow(64, 3); // relative: particles per 64^3 cube
}
}
}
// div0: ticrate independent, 1 = identity (not 20)
- toucher.velocity = toucher.velocity * (this.strength ** pushdeltatime);
+ toucher.velocity = toucher.velocity * pow(this.strength, pushdeltatime);
#ifdef SVQC
UpdateCSQCProjectile(toucher);
{
this.strength = IMPULSE_DEFAULT_ACCEL_STRENGTH;
}
- this.strength = (this.strength ** autocvar_g_triggerimpulse_accel_power) * autocvar_g_triggerimpulse_accel_multiplier;
+ this.strength = pow(this.strength, autocvar_g_triggerimpulse_accel_power) * autocvar_g_triggerimpulse_accel_multiplier;
settouch(this, trigger_impulse_touch_accel);
}
}
vector v = this.movedir;
float t = v.z / grav;
- float jump_height = 1/2 * grav * (t ** 2);
+ float jump_height = 1/2 * grav * pow(t, 2);
float remaining_height = org.z + jump_height - endpos.z;
float v2_z = sqrt(2 * grav * remaining_height);
float upspeed = this.velocity * v_up;
// responsiveness factor for steering and acceleration
- float f = 1 / (1 + ((max(-myspeed, myspeed) / PHYS_BUGRIGS_SPEED_REF(this)) ** PHYS_BUGRIGS_SPEED_POW(this)));
+ float f = 1 / (1 + pow((max(-myspeed, myspeed) / PHYS_BUGRIGS_SPEED_REF(this)), PHYS_BUGRIGS_SPEED_POW(this)));
//MAXIMA: f(v) := 1 / (1 + (v / PHYS_BUGRIGS_SPEED_REF(this)) ^ PHYS_BUGRIGS_SPEED_POW(this));
float steerfactor;
float myspeed = vlen(this.velocity);
// responsiveness factor for steering and acceleration
- float f = 1 / (1 + (max(0, myspeed / PHYS_BUGRIGS_SPEED_REF(this)) ** PHYS_BUGRIGS_SPEED_POW(this)));
+ float f = 1 / (1 + pow(max(0, myspeed / PHYS_BUGRIGS_SPEED_REF(this)), PHYS_BUGRIGS_SPEED_POW(this)));
float steerfactor = -myspeed * f;
this.angles_y += steer * dt * steerfactor; // apply steering
this.dodging_direction.y = tap_direction_y;
// normalize the dodging_direction vector.. (unlike UT99) XD
- float length = sqrt(this.dodging_direction.x ** 2 + this.dodging_direction.y ** 2);
+ float length = sqrt(pow(this.dodging_direction.x, 2) + pow(this.dodging_direction.y, 2));
this.dodging_direction.x = this.dodging_direction.x / length;
this.dodging_direction.y = this.dodging_direction.y / length;
float score = PlayerScore_Get(it, SP_SCORE);
float handicap = fabs((score - mean_score) *
autocvar_g_dynamic_handicap_scale);
- handicap = handicap ** autocvar_g_dynamic_handicap_exponent;
+ handicap = pow(handicap, autocvar_g_dynamic_handicap_exponent);
if (score < mean_score)
{
handicap = -handicap;
if(!pushdeltatime) return;
// div0: ticrate independent, 1 = identity (not 20)
- toucher.velocity = toucher.velocity * (autocvar_g_nades_entrap_strength ** pushdeltatime);
+ toucher.velocity = toucher.velocity * pow(autocvar_g_nades_entrap_strength, pushdeltatime);
#ifdef SVQC
UpdateCSQCProjectile(toucher);
void Draw_WaypointSprite(entity this)
{
if (this.lifetime > 0)
- this.alpha = (bound(0, (this.fadetime - time) / this.lifetime, 1) ** waypointsprite_timealphaexponent);
+ this.alpha = pow(bound(0, (this.fadetime - time) / this.lifetime, 1), waypointsprite_timealphaexponent);
else
this.alpha = 1;
{
// restrict maximum normal distance to the waypoint's maximum distance to prevent exploiting cvars
float maxnormdistance = bound(0, waypointsprite_normdistance, this.maxdistance - 1);
- a *= (bound(0, (this.maxdistance - dist) / (this.maxdistance - maxnormdistance), 1) ** waypointsprite_distancealphaexponent);
+ a *= pow(bound(0, (this.maxdistance - dist) / (this.maxdistance - maxnormdistance), 1), waypointsprite_distancealphaexponent);
}
vector rgb = spritelookupcolor(this, spriteimage, this.teamradar_color);
(vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right)) - o.x,
(vid_conheight - (vid_conheight * waypointsprite_edgeoffset_bottom)) - o.y);
- float crosshairdistance = sqrt( ((o.x - vid_conwidth/2) ** 2) + ((o.y - vid_conheight/2) ** 2) );
+ float crosshairdistance = sqrt( pow((o.x - vid_conwidth/2), 2) + pow((o.y - vid_conheight/2), 2) );
t = waypointsprite_scale;
a *= waypointsprite_alpha;
{
return a == 0 ? (_lerp < 1 ? 0 : b)
: b == 0 ? (_lerp > 0 ? 0 : a)
- : a * (fabs(b / a) ** _lerp);
+ : a * pow(fabs(b / a), _lerp);
}
void PM_ClientMovement_UpdateStatus(entity this)
if (dot > 0) // we can't change direction while slowing down
{
- k *= (dot ** PHYS_AIRCONTROL_POWER(this)) * dt;
+ k *= pow(dot, PHYS_AIRCONTROL_POWER(this)) * dt;
xyspeed = max(0, xyspeed - PHYS_AIRCONTROL_PENALTY(this) * sqrt(max(0, 1 - dot*dot)) * k/32);
k *= PHYS_AIRCONTROL(this);
this.velocity = normalize(this.velocity * xyspeed + wishdir * k);
if(this.maxdistance > waypointsprite_normdistance)
- a *= (bound(0, (this.maxdistance - dist) / (this.maxdistance - waypointsprite_normdistance), 1) ** waypointsprite_distancealphaexponent);
+ a *= pow(bound(0, (this.maxdistance - dist) / (this.maxdistance - waypointsprite_normdistance), 1), waypointsprite_distancealphaexponent);
else if(this.maxdistance > 0)
- a *= (bound(0, (waypointsprite_fadedistance - dist) / (waypointsprite_fadedistance - waypointsprite_normdistance), 1) ** waypointsprite_distancealphaexponent) * (1 - waypointsprite_minalpha) + waypointsprite_minalpha;
+ a *= pow(bound(0, (waypointsprite_fadedistance - dist) / (waypointsprite_fadedistance - waypointsprite_normdistance), 1), waypointsprite_distancealphaexponent) * (1 - waypointsprite_minalpha) + waypointsprite_minalpha;
if(rgb == '0 0 0')
{
(vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right)) - o_x,
(vid_conheight - (vid_conheight * waypointsprite_edgeoffset_bottom)) - o_y);
- float crosshairdistance = sqrt( ((o.x - vid_conwidth/2) ** 2) + ((o.y - vid_conheight/2) ** 2) );
+ float crosshairdistance = sqrt( pow((o.x - vid_conwidth/2), 2) + pow((o.y - vid_conheight/2), 2) );
t = waypointsprite_scale;
a *= waypointsprite_alpha;
STATIC_INIT(compressShortVector)
{
float l = 1;
- float f = (2 ** (1/8));
+ float f = pow(2, (1/8));
int i;
for(i = 0; i < 128; ++i)
{
float tagscale;
org = e.origin - gettaginfo(to, gettagindex(to, tag));
- tagscale = (vlen(v_forward) ** -2); // undo a scale on the tag
+ tagscale = pow(vlen(v_forward), -2); // undo a scale on the tag
t_forward = v_forward * tagscale;
t_left = v_right * -tagscale;
t_up = v_up * tagscale;
float tmpblinkValue = 0.55 + sin(time * 3) * 0.45;
tmpPos.x = vehicleHud_Pos.x + vehicleHud_Size.x * (96/256) - tmpSize.x;
tmpPos.y = vehicleHud_Pos.y;
- tmpSize = '1 1 1' * hud_fontsize;
+ tmpSize = hud_fontsize;
drawstring(tmpPos, sprintf(_("Press %s"), getcommandkey(_("drop weapon"), "dropweapon")), tmpSize, '1 0 0' + '0 1 1' * tmpblinkValue, hudAlpha, DRAWFLAG_NORMAL);
}
return avg_origin; // nothing to do
// yes, mathematically we can do this in ONE step, but beware of 32bit floats...
- avg_dist = (vlen(e.origin - avg_origin) ** 2);
+ avg_dist = pow(vlen(e.origin - avg_origin), 2);
for(p = e; (p = p.queuenext) != e; )
- avg_dist += (vlen(WarpZone_RefSys_TransformOrigin(p, e, p.origin) - avg_origin) ** 2);
+ avg_dist += pow(vlen(WarpZone_RefSys_TransformOrigin(p, e, p.origin) - avg_origin), 2);
avg_dist *= (1.0 / n);
avg_dist = sqrt(avg_dist);
float dt, dmg_remaining_next, f;
dt = time - this.teleport_time;
- dmg_remaining_next = (bound(0, 1 - dt / this.dmg_duration, 1) ** this.dmg_power);
+ dmg_remaining_next = pow(bound(0, 1 - dt / this.dmg_duration, 1), this.dmg_power);
f = this.dmg_last - dmg_remaining_next;
this.dmg_last = dmg_remaining_next;
if (restart) {
snd1 = TUBA_STARTNOTE(e.tuba_instrument, e.note - m + Tuba_PitchStep);
}
- speed1 = (2.0 ** ((m - Tuba_PitchStep) / 12.0));
+ speed1 = pow(2.0, ((m - Tuba_PitchStep) / 12.0));
} else if (e.note - m + Tuba_PitchStep > TUBA_MAX) {
if (restart) {
snd1 = TUBA_STARTNOTE(e.tuba_instrument, e.note - m);
}
- speed1 = (2.0 ** (m / 12.0));
+ speed1 = pow(2.0, (m / 12.0));
} else {
if (restart) {
snd1 = TUBA_STARTNOTE(e.tuba_instrument, e.note - m);
}
vol1 = cos(M_PI_2 * m / Tuba_PitchStep);
- speed1 = (2.0 ** (m / 12.0));
+ speed1 = pow(2.0, (m / 12.0));
if (restart) {
snd2 = TUBA_STARTNOTE(e.tuba_instrument, e.note - m + Tuba_PitchStep);
}
vol2 = sin(M_PI_2 * m / Tuba_PitchStep);
- speed2 = (2.0 ** ((m - Tuba_PitchStep) / 12.0));
+ speed2 = pow(2.0, ((m - Tuba_PitchStep) / 12.0));
}
} else if (restart) {
snd1 = TUBA_STARTNOTE(e.tuba_instrument, e.note);
#ifndef QCC_SUPPORT_POW
#define pow(a, b) pow(a, b)
#else
- #define pow(a, b) ((a) ** (b))
+ #define pow(a, b) POW(a, b)
#endif
#include "self.qh"
#pragma once
#ifndef QCC_SUPPORT_ACCUMULATE
- #ifdef GMQCC
+ #if defined(GMQCC) || defined(FTEQCC)
#define QCC_SUPPORT_ACCUMULATE
#endif
#endif
#ifndef QCC_SUPPORT_NIL
- #ifdef GMQCC
+ #if defined(GMQCC) || defined(FTEQCC)
#define QCC_SUPPORT_NIL
#endif
#endif
#ifndef QCC_SUPPORT_ERASEABLE
- #ifdef GMQCC
+ #if defined(GMQCC) || defined(FTEQCC)
#define QCC_SUPPORT_ERASEABLE
#endif
#endif
#ifndef QCC_SUPPORT_ALIAS
- #ifdef GMQCC
+ #if defined(GMQCC) || defined(FTEQCC)
#define QCC_SUPPORT_ALIAS
#endif
#endif
#ifndef QCC_SUPPORT_POW
- #ifdef GMQCC
+ #if defined(GMQCC) || defined(FTEQCC)
#define QCC_SUPPORT_POW
#endif
#endif
-#ifdef GMQCC
+#if defined(GMQCC) || defined(FTEQCC)
#define LABEL(id) :id
#else
#define LABEL(id) id:
#endif
+
+#ifdef QCC_SUPPORT_POW
+ #ifdef FTEQCC
+ #define POW(a, b) ((a) *^ (b))
+ #else
+ #define POW(a, b) ((a) ** (b))
+ #endif
+#endif
void mean_accumulate(entity e, .float a, .float c, float mean, float value, float weight)
{
if (weight == 0) return;
- if (mean == 0) e.(a) *= (value ** weight);
- else e.(a) += (value ** mean) * weight;
+ if (mean == 0) e.(a) *= pow(value, weight);
+ else e.(a) += pow(value, mean) * weight;
e.(c) += weight;
}
float mean_evaluate(entity e, .float a, .float c, float mean)
{
if (e.(c) == 0) return 0;
- if (mean == 0) return (e.(a) ** (1.0 / e.(c)));
- else return ((e.(a) / e.(c)) ** (1.0 / mean));
+ if (mean == 0) return pow(e.(a), (1.0 / e.(c)));
+ else return pow((e.(a) / e.(c)), (1.0 / mean));
}
#define MEAN_ACCUMULATE(s, prefix, v, w) mean_accumulate(s, prefix##_accumulator, prefix##_count, prefix##_mean, v, w)
ERASEABLE
float ExponentialFalloff(float mindist, float maxdist, float halflifedist, float d)
{
- if (halflifedist > 0) return (0.5 ** ((bound(mindist, d, maxdist) - mindist) / halflifedist));
- else if (halflifedist < 0) return (0.5 ** ((bound(mindist, d, maxdist) - maxdist) / halflifedist));
+ if (halflifedist > 0) return pow(0.5, ((bound(mindist, d, maxdist) - mindist) / halflifedist));
+ else if (halflifedist < 0) return pow(0.5, ((bound(mindist, d, maxdist) - maxdist) / halflifedist));
else return 1;
}
-#define power2of(e) (2 ** e)
+#define power2of(e) pow(2, e)
ERASEABLE
float log2of(float e)
float f;
f = dt * 60;
// http://home.earthlink.net/~ltrammell/tech/pinkalg.htm
- if (random() > (0.3190 ** f)) e.noise_paccum = 0.34848 * (2 * random() - 1);
- if (random() > (0.7756 ** f)) e.noise_paccum2 = 0.28768 * (2 * random() - 1);
- if (random() > (0.9613 ** f)) e.noise_paccum3 = 0.43488 * (2 * random() - 1);
+ if (random() > pow(0.3190, f)) e.noise_paccum = 0.34848 * (2 * random() - 1);
+ if (random() > pow(0.7756, f)) e.noise_paccum2 = 0.28768 * (2 * random() - 1);
+ if (random() > pow(0.9613, f)) e.noise_paccum3 = 0.43488 * (2 * random() - 1);
return e.noise_paccum + e.noise_paccum2 + e.noise_paccum3;
}
ERASEABLE
ERASEABLE
float Noise_Burst(entity e, float dt, float p)
{
- if (random() > (p ** dt)) e.noise_bstate = !e.noise_bstate;
+ if (random() > pow(p, dt)) e.noise_bstate = !e.noise_bstate;
return 2 * e.noise_bstate - 1;
}
#if 1
/** Vector distance comparison, avoids sqrt() */
-#define vdist(v, cmp, f) (vlen2(v) cmp ((f) ** 2))
+#define vdist(v, cmp, f) (vlen2(v) cmp pow((f), 2))
#else
#define vdist(v, cmp, f) (vlen(v) cmp (f))
#endif
adding = false;
string before = (i > 0) ? substring(s, 0, argv_end_index(i - 1)) : "";
string after = (i < n - 1) ? substring(s, argv_start_index(i + 1), -1) : "";
- s = strcat(before, (before != "" && after != "" ? " " : ""), after);
+ s = strcat(before, ((before != "" && after != "") ? " " : ""), after);
ret = s;
// keep searching
// TODO: why not break here?
{
return
(
- 2500 * (0.25 ** max(0, cvar("gl_picmip") + cvar("gl_picmip_other")))
- + 1500 * (0.25 ** max(0, cvar("gl_picmip") + cvar("gl_picmip_world")))
+ 2500 * pow(0.25, max(0, cvar("gl_picmip") + cvar("gl_picmip_other")))
+ + 1500 * pow(0.25, max(0, cvar("gl_picmip") + cvar("gl_picmip_world")))
) * ((s3tc && (cvar("r_texture_dds_load") || cvar("gl_texturecompression"))) ? 0.2 : 1.0); // TC: normalmaps 50%, other 25%, few incompressible, guessing 40% as conservative average
}
void XonoticPicmipSlider_autofix(entity me)
this.bot_5th_order_aimfilter= this.bot_5th_order_aimfilter
+ (this.bot_4th_order_aimfilter - this.bot_5th_order_aimfilter) * bound(0, autocvar_bot_ai_aimskill_order_filter_5th,1);
- //blend = (bound(0,skill,10)*0.1)*((1-bound(0,skill,10)*0.05) ** 2.5)*5.656854249; //Plot formule before changing !
+ //blend = (bound(0,skill,10)*0.1)*pow((1-bound(0,skill,10)*0.05), 2.5)*5.656854249; //Plot formule before changing !
blend = bound(0,skill+this.bot_aimskill,10)*0.1;
desiredang = desiredang + blend *
(
blendrate = autocvar_bot_ai_aimskill_blendrate;
r = max(fixedrate, blendrate);
//this.v_angle = this.v_angle + diffang * bound(frametime, r * frametime * (2+skill*skill*0.05-random()*0.05*(10-skill)), 1);
- r = bound(delta_t, r * delta_t * (2 + ((skill + this.bot_mouseskill) ** 3) * 0.005 - random()), 1);
+ r = bound(delta_t, r * delta_t * (2 + pow((skill + this.bot_mouseskill), 3) * 0.005 - random()), 1);
this.v_angle += diffang * (r + (1 - r) * bound(0, 1 - autocvar_bot_ai_aimskill_mouse, 1));
this.v_angle_z = 0;
if(autocvar_bot_god)
this.flags |= FL_GODMODE;
- this.bot_nextthink = max(time, this.bot_nextthink) + max(0.01, autocvar_bot_ai_thinkinterval * (0.5 ** this.bot_aiskill) * min(14 / (skill + 14), 1));
+ this.bot_nextthink = max(time, this.bot_nextthink) + max(0.01, autocvar_bot_ai_thinkinterval * pow(0.5, this.bot_aiskill) * min(14 / (skill + 14), 1));
if (!IS_PLAYER(this) || (autocvar_g_campaign && !campaign_bots_may_start))
{
void bot_calculate_stepheightvec()
{
stepheightvec = autocvar_sv_stepheight * '0 0 1';
- jumpheight_vec = (autocvar_sv_jumpvelocity ** 2) / (2 * autocvar_sv_gravity) * '0 0 1';
+ jumpheight_vec = pow(autocvar_sv_jumpvelocity, 2) / (2 * autocvar_sv_gravity) * '0 0 1';
jumpstepheightvec = stepheightvec + jumpheight_vec * 0.85; // reduce it a bit to make the jumps easy
jumpheight_time = autocvar_sv_jumpvelocity / autocvar_sv_gravity;
}
IL_EACH(g_items, it.item_group == gr && it.solid,
{
float dist2 = vlen2(this.origin - it.origin);
- if (dist2 < 600 ** 2 && dist2 > selected_dist2)
+ if (dist2 < pow(600, 2) && dist2 > selected_dist2)
{
selected = it;
selected_dist2 = vlen2(this.origin - selected.origin);
if(d < db || d < 500)
{
// Brake
- if (vel2 > (maxspeed * 0.3) ** 2)
+ if (vel2 > pow((maxspeed * 0.3), 2))
{
CS(this).movement_x = dir * v_forward * -maxspeed;
return;
this.havocbot_chooseenemy_finished = time + autocvar_bot_ai_enemydetectioninterval;
vector eye = this.origin + this.view_ofs;
entity best = NULL;
- float bestrating = autocvar_bot_ai_enemydetectionradius ** 2;
+ float bestrating = pow(autocvar_bot_ai_enemydetectionradius, 2);
// Backup hit flags
int hf = this.dphitcontentsmask;
{
scan_secondary_targets = true;
// restart the loop
- bestrating = autocvar_bot_ai_enemydetectionradius ** 2;
+ bestrating = pow(autocvar_bot_ai_enemydetectionradius, 2);
goto scan_targets;
}
this.lastcombotime = time;
}
- distance *= (2 ** this.bot_rangepreference);
+ distance *= pow(2, this.bot_rangepreference);
// Custom weapon list based on distance to the enemy
if(bot_custom_weapon){
// Rate the item only if no one needs it, or if an enemy is closer to it
dist2 = vlen2(item_org - org);
if ((enemy_dist2 < friend_dist2 && dist2 < enemy_dist2)
- || (friend_dist2 > autocvar_bot_ai_friends_aware_pickup_radius ** 2)
- || (dist2 < friend_dist2 && dist2 < 200 ** 2))
+ || (friend_dist2 > pow(autocvar_bot_ai_friends_aware_pickup_radius, 2))
+ || (dist2 < friend_dist2 && dist2 < pow(200, 2)))
return true;
return false;
};
{
case "all":
if(enabled)
- this.bot_cmd_keys = (2 ** 20) - 1; // >:)
+ this.bot_cmd_keys = pow(2, 20) - 1; // >:)
else
this.bot_cmd_keys = BOT_CMD_KEY_NONE;
case "forward":
string newlist;
// now reinsert this at another position
- insertpos = (random() ** (1 / exponent)); // ]0, 1]
+ insertpos = pow(random(), (1 / exponent)); // ]0, 1]
insertpos = insertpos * (Map_Count - 1); // ]0, Map_Count - 1]
insertpos = ceil(insertpos) + 1; // {2, 3, 4, ..., Map_Count}
LOG_TRACE("SHUFFLE: insert pos = ", ftos(insertpos));
RandomSelection_Init();
for(spot = firstspot; spot; spot = spot.chain)
- RandomSelection_AddEnt(spot, (bound(lower, spot.spawnpoint_score.y, upper) ** exponent) * spot.cnt, (spot.spawnpoint_score.y >= lower) * 0.5 + spot.spawnpoint_score.x);
+ RandomSelection_AddEnt(spot, pow(bound(lower, spot.spawnpoint_score.y, upper), exponent) * spot.cnt, (spot.spawnpoint_score.y >= lower) * 0.5 + spot.spawnpoint_score.x);
return RandomSelection_chosen_ent;
}
WORKDIR=${WORKDIR}
CPP=${CPP}
QCC=${QCC}
-QCCIDENT="-DGMQCC"
+QCCIDENT=${QCCIDENT}
QCCDEFS=${QCCDEFS}
QCCFLAGS=${QCCFLAGS}