diff --git a/plugins/include/amxconst.inc b/plugins/include/amxconst.inc index 40b1174e..8fb29b8c 100755 --- a/plugins/include/amxconst.inc +++ b/plugins/include/amxconst.inc @@ -171,14 +171,14 @@ enum { print_console, print_chat, print_center, -} +}; /* Destination types for engclient_print() */ enum { engprint_console = 0, engprint_center, engprint_chat, -} +}; /* Render for set_user_rendering() */ enum { @@ -188,7 +188,7 @@ enum { kRenderGlow, /* src*a+dest -- No Z buffer checks */ kRenderTransAlpha, /* src*srca+dest*(1-srca) */ kRenderTransAdd, /* src*a+dest */ -} +}; /* Fx for set_user_rendering() */ enum { @@ -213,14 +213,14 @@ enum { kRenderFxExplode, /* Scale up really big! */ kRenderFxGlowShell, /* Glowing Shell */ kRenderFxClampMinScale, /* Keep this sprite from getting very small (SPRITES only!) */ -} +}; /* Type for force_unmodified() */ enum { force_exactfile = 0, /* File on client must exactly match server's file */ force_model_samebounds, /* For model files only, the geometry must fit in the same bbox */ force_model_specifybounds, /* For model files only, the geometry must fit in the specified bbox */ -} +}; /* Status for get_module() */ enum { diff --git a/plugins/include/amxmod_compat/Vexd_Utilities.inc b/plugins/include/amxmod_compat/Vexd_Utilities.inc index 1bf5addd..5c4d1a49 100644 --- a/plugins/include/amxmod_compat/Vexd_Utilities.inc +++ b/plugins/include/amxmod_compat/Vexd_Utilities.inc @@ -18,92 +18,92 @@ #endif stock Entvars_Get_Int(iIndex, iVariable) - return entity_get_int(iIndex, iVariable) + return entity_get_int(iIndex, iVariable); stock Entvars_Set_Int(iIndex, iVariable, iNewValue) - return entity_set_int(iIndex, iVariable, iNewValue) + return entity_set_int(iIndex, iVariable, iNewValue); stock Float:Entvars_Get_Float(iIndex, iVariable) - return entity_get_float(iIndex, iVariable) + return entity_get_float(iIndex, iVariable); stock Entvars_Set_Float(iIndex, iVariable, Float:fNewValue) - return entity_set_float(iIndex, iVariable, fNewValue) + return entity_set_float(iIndex, iVariable, fNewValue); stock Entvars_Get_Vector(iIndex, iVariable, Float:vRetVector[3]) - return entity_get_vector(iIndex, iVariable, vRetVector) + return entity_get_vector(iIndex, iVariable, vRetVector); stock Entvars_Set_Vector(iIndex, iVariable, Float:vNewVector[3]) - return entity_set_vector(iIndex, iVariable, vNewVector) + return entity_set_vector(iIndex, iVariable, vNewVector); stock Entvars_Get_Edict(iIndex, iVariable) - return entity_get_edict(iIndex, iVariable) + return entity_get_edict(iIndex, iVariable); stock Entvars_Set_Edict(iIndex, iVariable, iNewIndex) - return entity_set_edict(iIndex, iVariable, iNewIndex) + return entity_set_edict(iIndex, iVariable, iNewIndex); stock Entvars_Get_String(iIndex, iVariable, szReturnValue[], iReturnLen) - return entity_get_string(iIndex, iVariable, szReturnValue, iReturnLen) + return entity_get_string(iIndex, iVariable, szReturnValue, iReturnLen); stock Entvars_Set_String(iIndex, iVariable, szNewValue[]) - return entity_set_string(iIndex, iVariable, szNewValue) + return entity_set_string(iIndex, iVariable, szNewValue); stock Entvars_Get_Byte(iIndex, iVariable) - return entity_get_byte(iIndex, iVariable) + return entity_get_byte(iIndex, iVariable); stock Entvars_Set_Byte(iIndex, iVariable, iNewValue) - return entity_set_byte(iIndex, iVariable, iNewValue) + return entity_set_byte(iIndex, iVariable, iNewValue); stock CreateEntity(szClassname[]) - return create_entity(szClassname) + return create_entity(szClassname); stock ENT_SetModel(iIndex, szModel[]) - return entity_set_model(iIndex, szModel) + return entity_set_model(iIndex, szModel); stock ENT_SetOrigin(iIndex, Float:fNewOrigin[3]) - return entity_set_origin(iIndex, fNewOrigin) + return entity_set_origin(iIndex, fNewOrigin); stock FindEntity(iIndex, szValue[]) - return find_ent_by_class(iIndex, szValue) + return find_ent_by_class(iIndex, szValue); stock RemoveEntity(iIndex) - return remove_entity(iIndex) + return remove_entity(iIndex); stock TraceLn(iIgnoreEnt, Float:fStart[3], Float:fEnd[3], Float:vReturn[3]) - return trace_line(iIgnoreEnt, fStart, fEnd, vReturn) + return trace_line(iIgnoreEnt, fStart, fEnd, vReturn); stock TraceNormal(iIgnoreEnt, Float:fStart[3], Float:fEnd[3], Float:vReturn[3]) - return trace_normal(iIgnoreEnt, fStart, fEnd, vReturn) + return trace_normal(iIgnoreEnt, fStart, fEnd, vReturn); stock VecToAngles(Float:fVector[3], Float:vReturn[3]) - return vector_to_angle(fVector, vReturn) + return vector_to_angle(fVector, vReturn); stock Float:VecLength(Float:vVector[3]) - return vector_length(vVector) + return vector_length(vVector); stock Float:VecDist(Float:vVector[3], Float:vVector2[3]) - return vector_distance(vVector, vVector2) + return vector_distance(vVector, vVector2); stock MessageBlock(iMessage, iMessageFlags) - return set_msg_block(iMessage, iMessageFlags) + return set_msg_block(iMessage, iMessageFlags); stock GetMessageBlock(iMessage) - return get_msg_block(iMessage) + return get_msg_block(iMessage); stock Float:HLTime() - return halflife_time() + return halflife_time(); stock FakeTouch(iToucher, iTouched) - return fake_touch(iToucher, iTouched) + return fake_touch(iToucher, iTouched); stock AttachView(iIndex, iTargetIndex) - return attach_view(iIndex, iTargetIndex) + return attach_view(iIndex, iTargetIndex); stock SetView(iIndex, ViewType) - return set_view(iIndex, ViewType) + return set_view(iIndex, ViewType); stock SetSpeak(iIndex, iSpeakFlags) - return set_speak(iIndex, iSpeakFlags) + return set_speak(iIndex, iSpeakFlags); -forward vexd_pfntouch(pToucher, pTouched) +forward vexd_pfntouch(pToucher, pTouched); -forward ServerFrame() \ No newline at end of file +forward ServerFrame(); diff --git a/plugins/include/amxmod_compat/amxmod.inc b/plugins/include/amxmod_compat/amxmod.inc index 94019166..d84a7a19 100644 --- a/plugins/include/amxmod_compat/amxmod.inc +++ b/plugins/include/amxmod_compat/amxmod.inc @@ -20,7 +20,7 @@ #include #include -stock AMX_VERSION[] = "1.76-BC" +stock AMX_VERSION[] = "1.76-BC"; #define ADMIN_PERMBAN ADMIN_BAN //AMX Mod admin flag for permanent ban #define ADMIN_UNBAN ADMIN_BAN //AMX Mod admin flag for unbanning @@ -307,12 +307,12 @@ stock is_module_running(const module[]) stock is_plugin_running(const plugin[]) { - new status[8] - new id, filename[1], name[1], version[1], author[1] + new status[8]; + new id, filename[1], name[1], version[1], author[1]; - id = is_plugin_loaded(plugin) + id = is_plugin_loaded(plugin); - get_plugin(id, filename, 0, name, 0, version, 0, author, 0, status, 7) + get_plugin(id, filename, 0, name, 0, version, 0, author, 0, status, 7); - return strcmp(status, "running") == 0 ? id + 1 : 0 + return strcmp(status, "running") == 0 ? id + 1 : 0; } diff --git a/plugins/include/amxmod_compat/maths.inc b/plugins/include/amxmod_compat/maths.inc index 7292c9a9..08b681cc 100644 --- a/plugins/include/amxmod_compat/maths.inc +++ b/plugins/include/amxmod_compat/maths.inc @@ -16,70 +16,70 @@ stock Float:fabs(Float:value) { - return floatabs(value) + return floatabs(value); } stock Float:asin(Float:value) { - return floatasin(value, radian) + return floatasin(value, radian); } stock Float:sin(Float:value) { - return floatsin(value, radian) + return floatsin(value, radian); } stock Float:sinh(Float:value) { - return floatsinh(value, radian) + return floatsinh(value, radian); } stock Float:acos(Float:value) { - return floatacos(value, radian) + return floatacos(value, radian); } stock Float:cos(Float:value) { - return floatcos(value, radian) + return floatcos(value, radian); } stock Float:cosh(Float:value) { - return floatcosh(value, radian) + return floatcosh(value, radian); } stock Float:atan(Float:value) { - return floatatan(value, radian) + return floatatan(value, radian); } stock Float:atan2(Float:value1, Float:value2) { - return floatatan2(value1, value2, radian) + return floatatan2(value1, value2, radian); } stock Float:tan(Float:value) { - return floattan(value, radian) + return floattan(value, radian); } stock Float:tanh(Float:value) { - return floattanh(value, radian) + return floattanh(value, radian); } stock Float:fsqroot(Float:value) { - return floatsqroot(value) + return floatsqroot(value); } stock Float:fpower(Float:value, Float:exponent) { - return floatpower(value, exponent) + return floatpower(value, exponent); } stock Float:flog(Float:value, Float:base=10.0) { - return floatlog(value, base) + return floatlog(value, base); } diff --git a/plugins/include/amxmod_compat/translator.inc b/plugins/include/amxmod_compat/translator.inc index f7a5c41a..87551b28 100644 --- a/plugins/include/amxmod_compat/translator.inc +++ b/plugins/include/amxmod_compat/translator.inc @@ -23,9 +23,9 @@ native translate(const string[], destid=-1, forcelang=-1); stock _T(const string[], destid=-1, forcelang=-1) { - new TranslationResult[2] = {0, 0} - TranslationResult[0] = translate(string, destid, forcelang) - return TranslationResult + new TranslationResult[2] = {0, 0}; + TranslationResult[0] = translate(string, destid, forcelang); + return TranslationResult; } stock load_translations(const file[]) diff --git a/plugins/include/amxmod_compat/xtrafun.inc b/plugins/include/amxmod_compat/xtrafun.inc index 0c995882..45031687 100644 --- a/plugins/include/amxmod_compat/xtrafun.inc +++ b/plugins/include/amxmod_compat/xtrafun.inc @@ -15,30 +15,30 @@ /* Gets the velocity of an entity */ stock get_entity_velocity(index, velocity[3]) { - new Float:vector[3] - entity_get_vector(index, EV_VEC_velocity, vector) - FVecIVec(vector, velocity) + new Float:vector[3]; + entity_get_vector(index, EV_VEC_velocity, vector); + FVecIVec(vector, velocity); } /* Sets the velocity of an entity */ stock set_entity_velocity(index, velocity[3]) { - new Float:vector[3] - IVecFVec(velocity, vector) - entity_set_vector(index, EV_VEC_velocity, vector) + new Float:vector[3]; + IVecFVec(velocity, vector); + entity_set_vector(index, EV_VEC_velocity, vector); } /* Gets the origin of an entity */ stock get_entity_origin(index, origin[3]) { - new Float:vector[3] - entity_get_vector(index, EV_VEC_origin, vector) - FVecIVec(vector, origin) + new Float:vector[3]; + entity_get_vector(index, EV_VEC_origin, vector); + FVecIVec(vector, origin); } /* Sets the origin of an entity */ stock set_entity_origin(index, origin[3]) { - new Float:vector[3] - IVecFVec(origin, vector) - entity_set_vector(index, EV_VEC_origin, vector) + new Float:vector[3]; + IVecFVec(origin, vector); + entity_set_vector(index, EV_VEC_origin, vector); } /* Get the index of the grenade belonging to index. @@ -51,16 +51,16 @@ stock set_entity_origin(index, origin[3]) { * FLASHBANG = "models/w_flashbang.mdl" * SMOKEGRENADE = "models/w_smokegrenade.mdl" */ stock get_grenade_index(index, model[], len, grenadeindex = 0) { - new entfind = grenadeindex - new entowner = index + new entfind = grenadeindex; + new entowner = index; for (;;) { - entfind = find_ent_by_class(entfind, "grenade") + entfind = find_ent_by_class(entfind, "grenade"); if (entfind && is_valid_ent(entfind)) { if (entity_get_edict(entFind, EV_ENT_owner) == entowner) { - entity_get_string(entfind, EV_SZ_model, model) - return entfind + entity_get_string(entfind, EV_SZ_model, model); + return entfind; } } else { @@ -79,7 +79,7 @@ enum { classname = 0, target, targetname -} +}; #if !defined _vexd_bcompat_included /* Find an entity ID from start_from_ent id (use 0 to start from @@ -87,10 +87,10 @@ enum { * "targetname", value is the name you are searching for */ stock find_entity(start_from_ent, category, value[]) { switch (category) { - case target: return find_ent_by_target(start_from_ent, value) - case targetname: return find_ent_by_tname(start_from_ent, value) + case target: return find_ent_by_target(start_from_ent, value); + case targetname: return find_ent_by_tname(start_from_ent, value); } - return find_ent_by_class(start_from_ent, value) + return find_ent_by_class(start_from_ent, value); } #endif diff --git a/plugins/include/core.inc b/plugins/include/core.inc index 67e87794..496c66e6 100755 --- a/plugins/include/core.inc +++ b/plugins/include/core.inc @@ -41,4 +41,4 @@ native tickcount(&granularity=0); stock abs(x) { return x > 0 ? x : -x; -} \ No newline at end of file +} diff --git a/plugins/include/csx.inc b/plugins/include/csx.inc index d92a74f3..604ec264 100755 --- a/plugins/include/csx.inc +++ b/plugins/include/csx.inc @@ -65,4 +65,4 @@ native xmod_get_maxweapons(); /* Returns stats array size */ native xmod_get_stats_size(); -/************* Shared Natives End ********************************/ \ No newline at end of file +/************* Shared Natives End ********************************/ diff --git a/plugins/include/dbi.inc b/plugins/include/dbi.inc index ae039598..82c24d84 100755 --- a/plugins/include/dbi.inc +++ b/plugins/include/dbi.inc @@ -31,14 +31,14 @@ enum Sql { SQL_FAILED=0, SQL_OK -} +}; enum Result { RESULT_FAILED=-1, RESULT_NONE, RESULT_OK -} +}; /* This will return a number equal to or below 0 on failure. * If it does fail, the error will be mirrored in dbi_error() diff --git a/plugins/include/dodconst.inc b/plugins/include/dodconst.inc index f7a0b8e2..40711096 100755 --- a/plugins/include/dodconst.inc +++ b/plugins/include/dodconst.inc @@ -50,14 +50,14 @@ enum { PS_PRONE, PS_PRONEDEPLOY, PS_DEPLOY, -} +}; /* info types for dod_get_map_info native */ enum { MI_ALLIES_TEAM = 0, MI_ALLIES_PARAS, MI_AXIS_PARAS, -} +}; /* DoD weapons */ enum { @@ -133,4 +133,3 @@ enum { DODC_PIAT, //DODC_BRIT_MORTAR, }; - diff --git a/plugins/include/dodstats.inc b/plugins/include/dodstats.inc index ed93d5a5..cf3d072b 100755 --- a/plugins/include/dodstats.inc +++ b/plugins/include/dodstats.inc @@ -60,4 +60,3 @@ native get_stats(index,stats[9],bodyhits[8],name[],len); /* Returns number of all entries in stats. */ native get_statsnum(); - diff --git a/plugins/include/dodx.inc b/plugins/include/dodx.inc index 99a361d3..5903eaae 100755 --- a/plugins/include/dodx.inc +++ b/plugins/include/dodx.inc @@ -28,7 +28,7 @@ enum { XMF_DAMAGE = 0, XMF_DEATH, XMF_SCORE, -} +}; /* Use this function to register forwards */ native register_statsfwd(ftype); diff --git a/plugins/include/engine_const.inc b/plugins/include/engine_const.inc index 91cac16c..c4414a64 100755 --- a/plugins/include/engine_const.inc +++ b/plugins/include/engine_const.inc @@ -61,7 +61,7 @@ enum { EV_INT_button, EV_INT_impulse, EV_INT_deadflag, -} +}; /* Float */ enum { @@ -102,7 +102,7 @@ enum { EV_FL_fuser2, EV_FL_fuser3, EV_FL_fuser4, -} +}; /* Vector */ enum { @@ -129,7 +129,7 @@ enum { EV_VEC_vuser2, EV_VEC_vuser3, EV_VEC_vuser4, -} +}; /* Edict */ enum { @@ -144,7 +144,7 @@ enum { EV_ENT_euser2, EV_ENT_euser3, EV_ENT_euser4, -} +}; /* String */ enum { @@ -161,7 +161,7 @@ enum { EV_SZ_noise3, EV_SZ_viewmodel, EV_SZ_weaponmodel, -} +}; /* Byte */ enum { @@ -171,7 +171,7 @@ enum { EV_BYTE_controller4, EV_BYTE_blending1, EV_BYTE_blending2, -} +}; #if defined _jghg_enums #endinput @@ -220,7 +220,7 @@ enum { // Void (not supported) GL_pSaveData -} +}; enum { diff --git a/plugins/include/engine_stocks.inc b/plugins/include/engine_stocks.inc index f604de95..bd96dd98 100755 --- a/plugins/include/engine_stocks.inc +++ b/plugins/include/engine_stocks.inc @@ -251,4 +251,3 @@ stock IsInWorld( ent ) return 1; } - diff --git a/plugins/include/fakemeta.inc b/plugins/include/fakemeta.inc index 8deabc94..4f659961 100755 --- a/plugins/include/fakemeta.inc +++ b/plugins/include/fakemeta.inc @@ -63,7 +63,7 @@ native set_pev(_index,_value,any:...); * @param _value The pev field to set - MUST be a string field. * @param _string The string handle, retrieved from places like AllocString. */ -native set_pev_string(_index, _value, _string) +native set_pev_string(_index, _value, _string); /** @@ -221,19 +221,19 @@ native copy_infokey_buffer(infoBuffer, out[], maxlen); * * @param entity The entity id to lookup. * @param name The sequence name to lookup, case insensitive. ("JUMP" would match "jump") - * @param framerate The framerate of the sequence, if found. - * @param loops Whether or not the sequence loops. + * @param framerate The framerate of the sequence, if found. + * @param loops Whether or not the sequence loops. * @param groundspeed The groundspeed setting of the sequence. * @return -1 on failed lookup, the sequence number on successful lookup. */ -native lookup_sequence(entity, const name[], &Float:framerate = 0.0, &bool:loops = false, &Float:groundspeed = 0.0) +native lookup_sequence(entity, const name[], &Float:framerate = 0.0, &bool:loops = false, &Float:groundspeed = 0.0); /** * Sets a bone controller with the specified value. * * @param entity The entity id to set the value on. * @param controller Which controller to set (0 through 3). - * @param value The value to set it to. + * @param value The value to set it to. * @return The percentage that the controller is extended (0.0 through 1.0) */ -native Float:set_controller(entity, controller, Float:value) \ No newline at end of file +native Float:set_controller(entity, controller, Float:value); diff --git a/plugins/include/fakemeta_util.inc b/plugins/include/fakemeta_util.inc index 8232436f..c9ba3872 100644 --- a/plugins/include/fakemeta_util.inc +++ b/plugins/include/fakemeta_util.inc @@ -53,11 +53,11 @@ return engfunc(EngFunc_DecalIndex, decalname) */ stock Float:fm_entity_range(ent1, ent2) { - new Float:origin1[3], Float:origin2[3] - pev(ent1, pev_origin, origin1) - pev(ent2, pev_origin, origin2) + new Float:origin1[3], Float:origin2[3]; + pev(ent1, pev_origin, origin1); + pev(ent2, pev_origin, origin2); - return get_distance_f(origin1, origin2) + return get_distance_f(origin1, origin2); } // based on KoST's port, upgraded version fits into the macros @@ -70,15 +70,15 @@ stock Float:fm_entity_range(ent1, ent2) { return engfunc(EngFunc_FindEntityByString, index, "classname", classname) */ stock fm_find_ent_by_owner(index, const classname[], owner, jghgtype = 0) { - new strtype[11] = "classname", ent = index + new strtype[11] = "classname", ent = index; switch (jghgtype) { - case 1: strtype = "target" - case 2: strtype = "targetname" + case 1: strtype = "target"; + case 2: strtype = "targetname"; } while ((ent = engfunc(EngFunc_FindEntityByString, ent, strtype, classname)) && pev(ent, pev_owner) != owner) {} - return ent + return ent; } #define fm_find_ent_by_target(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "target", %2) @@ -90,14 +90,14 @@ stock fm_find_ent_by_owner(index, const classname[], owner, jghgtype = 0) { return engfunc(EngFunc_FindEntityByString, index, "targetname", targetname) */ stock fm_find_ent_by_model(index, const classname[], const model[]) { - new ent = index, mdl[72] + new ent = index, mdl[72]; while ((ent = fm_find_ent_by_class(ent, classname))) { - pev(ent, pev_model, mdl, sizeof mdl - 1) + pev(ent, pev_model, mdl, sizeof mdl - 1); if (equal(mdl, model)) - return ent + return ent; } - return 0 + return 0; } #define fm_find_ent_in_sphere(%1,%2,%3) engfunc(EngFunc_FindEntityInSphere, %1, %2, %3) @@ -113,12 +113,12 @@ stock fm_find_ent_by_model(index, const classname[], const model[]) { return pev_valid(index) */ stock fm_entity_set_origin(index, const Float:origin[3]) { - new Float:mins[3], Float:maxs[3] - pev(index, pev_mins, mins) - pev(index, pev_maxs, maxs) - engfunc(EngFunc_SetSize, index, mins, maxs) + new Float:mins[3], Float:maxs[3]; + pev(index, pev_mins, mins); + pev(index, pev_maxs, maxs); + engfunc(EngFunc_SetSize, index, mins, maxs); - return engfunc(EngFunc_SetOrigin, index, origin) + return engfunc(EngFunc_SetOrigin, index, origin); } #define fm_entity_set_model(%1,%2) engfunc(EngFunc_SetModel, %1, %2) @@ -148,47 +148,47 @@ stock fm_entity_set_origin(index, const Float:origin[3]) { return engfunc(EngFunc_PointContents, point) */ stock fm_trace_line(ignoreent, const Float:start[3], const Float:end[3], Float:ret[3]) { - engfunc(EngFunc_TraceLine, start, end, ignoreent == -1 ? 1 : 0, ignoreent, 0) + engfunc(EngFunc_TraceLine, start, end, ignoreent == -1 ? 1 : 0, ignoreent, 0); - new ent = get_tr2(0, TR_pHit) - get_tr2(0, TR_vecEndPos, ret) + new ent = get_tr2(0, TR_pHit); + get_tr2(0, TR_vecEndPos, ret); - return pev_valid(ent) ? ent : 0 + return pev_valid(ent) ? ent : 0; } stock fm_trace_hull(const Float:origin[3], hull, ignoredent = 0, ignoremonsters = 0) { - new result = 0 - engfunc(EngFunc_TraceHull, origin, origin, ignoremonsters, hull, ignoredent > 0 ? ignoredent : 0, 0) + new result = 0; + engfunc(EngFunc_TraceHull, origin, origin, ignoremonsters, hull, ignoredent > 0 ? ignoredent : 0, 0); if (get_tr2(0, TR_StartSolid)) - result += 1 + result += 1; if (get_tr2(0, TR_AllSolid)) - result += 2 + result += 2; if (!get_tr2(0, TR_InOpen)) - result += 4 + result += 4; - return result + return result; } stock fm_trace_normal(ignoreent, const Float:start[3], const Float:end[3], Float:ret[3]) { - engfunc(EngFunc_TraceLine, start, end, 0, ignoreent, 0) - get_tr2(0, TR_vecPlaneNormal, ret) + engfunc(EngFunc_TraceLine, start, end, 0, ignoreent, 0); + get_tr2(0, TR_vecPlaneNormal, ret); - new Float:fraction - get_tr2(0, TR_flFraction, fraction) + new Float:fraction; + get_tr2(0, TR_flFraction, fraction); if (fraction >= 1.0) - return 0 + return 0; - return 1 + return 1; } // note that for CS planted C4 has a "grenade" classname as well stock fm_get_grenade_id(id, model[], len, grenadeid = 0) { - new ent = fm_find_ent_by_owner(grenadeid, "grenade", id) + new ent = fm_find_ent_by_owner(grenadeid, "grenade", id); if (ent && len > 0) - pev(ent, pev_model, model, len) + pev(ent, pev_model, model, len); - return ent + return ent; } #define fm_halflife_time() get_gametime() @@ -200,7 +200,7 @@ stock fm_get_grenade_id(id, model[], len, grenadeid = 0) { return engfunc(EngFunc_SetView, index, entity) */ stock fm_playback_event(flags, invoker, eventindex, Float:delay, const Float:origin[3], const Float:angles[3], Float:fparam1, Float:fparam2, iparam1, iparam2, bparam1, bparam2) { - return engfunc(EngFunc_PlaybackEvent, flags, invoker, eventindex, delay, origin, angles, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2) + return engfunc(EngFunc_PlaybackEvent, flags, invoker, eventindex, delay, origin, angles, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2); } #define fm_eng_get_string(%1,%2,%3) engfunc(EngFunc_SzFromIndex, %1, %2, %3) @@ -212,67 +212,67 @@ stock fm_playback_event(flags, invoker, eventindex, Float:delay, const Float:ori // the dot product is performed in 2d, making the view cone infinitely tall stock bool:fm_is_in_viewcone(index, const Float:point[3]) { - new Float:angles[3] - pev(index, pev_angles, angles) - engfunc(EngFunc_MakeVectors, angles) - global_get(glb_v_forward, angles) - angles[2] = 0.0 + new Float:angles[3]; + pev(index, pev_angles, angles); + engfunc(EngFunc_MakeVectors, angles); + global_get(glb_v_forward, angles); + angles[2] = 0.0; - new Float:origin[3], Float:diff[3], Float:norm[3] - pev(index, pev_origin, origin) - xs_vec_sub(point, origin, diff) - diff[2] = 0.0 - xs_vec_normalize(diff, norm) + new Float:origin[3], Float:diff[3], Float:norm[3]; + pev(index, pev_origin, origin); + xs_vec_sub(point, origin, diff); + diff[2] = 0.0; + xs_vec_normalize(diff, norm); - new Float:dot, Float:fov - dot = xs_vec_dot(norm, angles) - pev(index, pev_fov, fov) + new Float:dot, Float:fov; + dot = xs_vec_dot(norm, angles); + pev(index, pev_fov, fov); if (dot >= floatcos(fov * M_PI / 360)) - return true + return true; - return false + return false; } stock bool:fm_is_visible(index, const Float:point[3], ignoremonsters = 0) { - new Float:start[3], Float:view_ofs[3] - pev(index, pev_origin, start) - pev(index, pev_view_ofs, view_ofs) - xs_vec_add(start, view_ofs, start) + new Float:start[3], Float:view_ofs[3]; + pev(index, pev_origin, start); + pev(index, pev_view_ofs, view_ofs); + xs_vec_add(start, view_ofs, start); - engfunc(EngFunc_TraceLine, start, point, ignoremonsters, index, 0) + engfunc(EngFunc_TraceLine, start, point, ignoremonsters, index, 0); - new Float:fraction - get_tr2(0, TR_flFraction, fraction) + new Float:fraction; + get_tr2(0, TR_flFraction, fraction); if (fraction == 1.0) - return true + return true; - return false + return false; } /* Engine_stocks functions */ stock fm_fakedamage(victim, const classname[], Float:takedmgdamage, damagetype) { - new class[] = "trigger_hurt" - new entity = fm_create_entity(class) + new class[] = "trigger_hurt"; + new entity = fm_create_entity(class); if (!entity) - return 0 + return 0; - new value[16] - float_to_str(takedmgdamage * 2, value, sizeof value - 1) - fm_set_kvd(entity, "dmg", value, class) + new value[16]; + float_to_str(takedmgdamage * 2, value, sizeof value - 1); + fm_set_kvd(entity, "dmg", value, class); - num_to_str(damagetype, value, sizeof value - 1) - fm_set_kvd(entity, "damagetype", value, class) + num_to_str(damagetype, value, sizeof value - 1); + fm_set_kvd(entity, "damagetype", value, class); - fm_set_kvd(entity, "origin", "8192 8192 8192", class) - fm_DispatchSpawn(entity) + fm_set_kvd(entity, "origin", "8192 8192 8192", class); + fm_DispatchSpawn(entity); - set_pev(entity, pev_classname, classname) - fm_fake_touch(entity, victim) - fm_remove_entity(entity) + set_pev(entity, pev_classname, classname); + fm_fake_touch(entity, victim); + fm_remove_entity(entity); - return 1 + return 1; } #define fm_find_ent(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "classname", %2) @@ -301,69 +301,69 @@ stock fm_fakedamage(victim, const classname[], Float:takedmgdamage, damagetype) // optimization idea by Orangutanz stock fm_get_brush_entity_origin(index, Float:origin[3]) { - new Float:mins[3], Float:maxs[3] - pev(index, pev_mins, mins) - pev(index, pev_maxs, maxs) + new Float:mins[3], Float:maxs[3]; + pev(index, pev_mins, mins); + pev(index, pev_maxs, maxs); - origin[0] = (mins[0] + maxs[0]) * 0.5 - origin[1] = (mins[1] + maxs[1]) * 0.5 - origin[2] = (mins[2] + maxs[2]) * 0.5 + origin[0] = (mins[0] + maxs[0]) * 0.5; + origin[1] = (mins[1] + maxs[1]) * 0.5; + origin[2] = (mins[2] + maxs[2]) * 0.5; - return 1 + return 1; } // based on v3x's port, upgraded version returns number of removed entities stock fm_remove_entity_name(const classname[]) { - new ent = -1, num = 0 + new ent = -1, num = 0; while ((ent = fm_find_ent_by_class(ent, classname))) - num += fm_remove_entity(ent) + num += fm_remove_entity(ent); - return num + return num; } stock fm_ViewContents(id) { - new origin[3], Float:Orig[3] - get_user_origin(id, origin, 3) - IVecFVec(origin, Orig) + new origin[3], Float:Orig[3]; + get_user_origin(id, origin, 3); + IVecFVec(origin, Orig); - return fm_point_contents(Orig) + return fm_point_contents(Orig); } stock fm_get_speed(entity) { - new Float:Vel[3] - pev(entity, pev_velocity, Vel) + new Float:Vel[3]; + pev(entity, pev_velocity, Vel); - return floatround(vector_length(Vel)) + return floatround(vector_length(Vel)); } stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16) { - new Float:RenderColor[3] - RenderColor[0] = float(r) - RenderColor[1] = float(g) - RenderColor[2] = float(b) + new Float:RenderColor[3]; + RenderColor[0] = float(r); + RenderColor[1] = float(g); + RenderColor[2] = float(b); - set_pev(entity, pev_renderfx, fx) - set_pev(entity, pev_rendercolor, RenderColor) - set_pev(entity, pev_rendermode, render) - set_pev(entity, pev_renderamt, float(amount)) + set_pev(entity, pev_renderfx, fx); + set_pev(entity, pev_rendercolor, RenderColor); + set_pev(entity, pev_rendermode, render); + set_pev(entity, pev_renderamt, float(amount)); - return 1 + return 1; } stock fm_set_entity_flags(index, flag, onoff) { - new flags = pev(index, pev_flags) + new flags = pev(index, pev_flags); if ((flags & flag) > 0) - return onoff == 1 ? 2 : 1 + 0 * set_pev(index, pev_flags, flags - flag) + return onoff == 1 ? 2 : 1 + 0 * set_pev(index, pev_flags, flags - flag); else - return onoff == 0 ? 2 : 1 + 0 * set_pev(index, pev_flags, flags + flag) + return onoff == 0 ? 2 : 1 + 0 * set_pev(index, pev_flags, flags + flag); - return 0 + return 0; } stock fm_set_entity_visibility(index, visible = 1) { - set_pev(index, pev_effects, visible == 1 ? pev(index, pev_effects) & ~EF_NODRAW : pev(index, pev_effects) | EF_NODRAW) + set_pev(index, pev_effects, visible == 1 ? pev(index, pev_effects) & ~EF_NODRAW : pev(index, pev_effects) | EF_NODRAW); - return 1 + return 1; } #define fm_get_entity_visibility(%1) (!(pev(%1, pev_effects) & EF_NODRAW)) @@ -371,9 +371,9 @@ stock fm_set_entity_visibility(index, visible = 1) { return !(pev(index, pev_effects) & EF_NODRAW) */ stock fm_set_user_velocity(entity, const Float:vector[3]) { - set_pev(entity, pev_velocity, vector) + set_pev(entity, pev_velocity, vector); - return 1 + return 1; } #define fm_get_user_velocity(%1,%2) pev(%1, pev_velocity, %2) @@ -392,90 +392,90 @@ stock fm_set_user_velocity(entity, const Float:vector[3]) { return engfunc(EngFunc_SetClientListening, receiver, sender, listen) */ stock fm_get_user_godmode(index) { - new Float:val - pev(index, pev_takedamage, val) + new Float:val; + pev(index, pev_takedamage, val); - return (val == DAMAGE_NO) + return (val == DAMAGE_NO); } stock fm_set_user_godmode(index, godmode = 0) { - set_pev(index, pev_takedamage, godmode == 1 ? DAMAGE_NO : DAMAGE_AIM) + set_pev(index, pev_takedamage, godmode == 1 ? DAMAGE_NO : DAMAGE_AIM); - return 1 + return 1; } stock fm_set_user_armor(index, armor) { - set_pev(index, pev_armorvalue, float(armor)) + set_pev(index, pev_armorvalue, float(armor)); - return 1 + return 1; } stock fm_set_user_health(index, health) { - health > 0 ? set_pev(index, pev_health, float(health)) : dllfunc(DLLFunc_ClientKill, index) + health > 0 ? set_pev(index, pev_health, float(health)) : dllfunc(DLLFunc_ClientKill, index); - return 1 + return 1; } stock fm_set_user_origin(index, /* const */ origin[3]) { - new Float:orig[3] - IVecFVec(origin, orig) + new Float:orig[3]; + IVecFVec(origin, orig); - return fm_entity_set_origin(index, orig) + return fm_entity_set_origin(index, orig); } stock fm_set_user_rendering(index, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16) { - return fm_set_rendering(index, fx, r, g, b, render, amount) + return fm_set_rendering(index, fx, r, g, b, render, amount); } stock fm_give_item(index, const item[]) { if (!equal(item, "weapon_", 7) && !equal(item, "ammo_", 5) && !equal(item, "item_", 5) && !equal(item, "tf_weapon_", 10)) - return 0 + return 0; - new ent = fm_create_entity(item) + new ent = fm_create_entity(item); if (!pev_valid(ent)) - return 0 + return 0; - new Float:origin[3] - pev(index, pev_origin, origin) - set_pev(ent, pev_origin, origin) - set_pev(ent, pev_spawnflags, pev(ent, pev_spawnflags) | SF_NORESPAWN) - dllfunc(DLLFunc_Spawn, ent) + new Float:origin[3]; + pev(index, pev_origin, origin); + set_pev(ent, pev_origin, origin); + set_pev(ent, pev_spawnflags, pev(ent, pev_spawnflags) | SF_NORESPAWN); + dllfunc(DLLFunc_Spawn, ent); - new save = pev(ent, pev_solid) - dllfunc(DLLFunc_Touch, ent, index) + new save = pev(ent, pev_solid); + dllfunc(DLLFunc_Touch, ent, index); if (pev(ent, pev_solid) != save) - return ent + return ent; - engfunc(EngFunc_RemoveEntity, ent) + engfunc(EngFunc_RemoveEntity, ent); - return -1 + return -1; } stock fm_set_user_maxspeed(index, Float:speed = -1.0) { - engfunc(EngFunc_SetClientMaxspeed, index, speed) - set_pev(index, pev_maxspeed, speed) + engfunc(EngFunc_SetClientMaxspeed, index, speed); + set_pev(index, pev_maxspeed, speed); - return 1 + return 1; } stock Float:fm_get_user_maxspeed(index) { - new Float:speed - pev(index, pev_maxspeed, speed) + new Float:speed; + pev(index, pev_maxspeed, speed); - return speed + return speed; } stock fm_set_user_gravity(index, Float:gravity = 1.0) { - set_pev(index, pev_gravity, gravity) + set_pev(index, pev_gravity, gravity); - return 1 + return 1; } stock Float:fm_get_user_gravity(index) { - new Float:gravity - pev(index, pev_gravity, gravity) + new Float:gravity; + pev(index, pev_gravity, gravity); - return gravity + return gravity; } /* interferes with FM_Spawn enum, just use fm_DispatchSpawn @@ -485,9 +485,9 @@ stock fm_spawn(entity) { */ stock fm_set_user_noclip(index, noclip = 0) { - set_pev(index, pev_movetype, noclip == 1 ? MOVETYPE_NOCLIP : MOVETYPE_WALK) + set_pev(index, pev_movetype, noclip == 1 ? MOVETYPE_NOCLIP : MOVETYPE_WALK); - return 1 + return 1; } #define fm_get_user_noclip(%1) (pev(%1, pev_movetype) == MOVETYPE_NOCLIP) @@ -496,32 +496,32 @@ stock fm_set_user_noclip(index, noclip = 0) { // note: get_user_weapon will still return former weapon index stock fm_strip_user_weapons(index) { - new ent = fm_create_entity("player_weaponstrip") + new ent = fm_create_entity("player_weaponstrip"); if (!pev_valid(ent)) - return 0 + return 0; - dllfunc(DLLFunc_Spawn, ent) - dllfunc(DLLFunc_Use, ent, index) - engfunc(EngFunc_RemoveEntity, ent) + dllfunc(DLLFunc_Spawn, ent); + dllfunc(DLLFunc_Use, ent, index); + engfunc(EngFunc_RemoveEntity, ent); - return 1 + return 1; } stock fm_set_user_frags(index, frags) { - set_pev(index, pev_frags, float(frags)) + set_pev(index, pev_frags, float(frags)); - return 1 + return 1; } /* Cstrike functions */ stock fm_cs_user_spawn(index) { - set_pev(index, pev_deadflag, DEAD_RESPAWNABLE) - dllfunc(DLLFunc_Spawn, index) - set_pev(index, pev_iuser1, 0) + set_pev(index, pev_deadflag, DEAD_RESPAWNABLE); + dllfunc(DLLFunc_Spawn, index); + set_pev(index, pev_iuser1, 0); - return 1 + return 1; } @@ -530,269 +530,269 @@ stock fm_cs_user_spawn(index) { // based on Basic-Master's set_keyvalue, upgraded version accepts an optional classname (a bit more efficient if it is passed) stock fm_set_kvd(entity, const key[], const value[], const classname[] = "") { if (classname[0]) - set_kvd(0, KV_ClassName, classname) + set_kvd(0, KV_ClassName, classname); else { - new class[32] - pev(entity, pev_classname, class, sizeof class - 1) - set_kvd(0, KV_ClassName, class) + new class[32]; + pev(entity, pev_classname, class, sizeof class - 1); + set_kvd(0, KV_ClassName, class); } - set_kvd(0, KV_KeyName, key) - set_kvd(0, KV_Value, value) - set_kvd(0, KV_fHandled, 0) + set_kvd(0, KV_KeyName, key); + set_kvd(0, KV_Value, value); + set_kvd(0, KV_fHandled, 0); - return dllfunc(DLLFunc_KeyValue, entity, 0) + return dllfunc(DLLFunc_KeyValue, entity, 0); } stock fm_find_ent_by_integer(index, pev_field, value) { - static maxents + static maxents; if (!maxents) - maxents = global_get(glb_maxEntities) + maxents = global_get(glb_maxEntities); for (new i = index + 1; i < maxents; ++i) { if (pev_valid(i) && pev(i, pev_field) == value) - return i + return i; } - return 0 + return 0; } stock fm_find_ent_by_flags(index, pev_field, flags) { - static maxents + static maxents; if (!maxents) - maxents = global_get(glb_maxEntities) + maxents = global_get(glb_maxEntities); for (new i = index + 1; i < maxents; ++i) { if (pev_valid(i) && (pev(i, pev_field) & flags) == flags) - return i + return i; } - return 0 + return 0; } stock Float:fm_distance_to_box(const Float:point[3], const Float:mins[3], const Float:maxs[3]) { - new Float:dist[3] + new Float:dist[3]; for (new i = 0; i < 3; ++i) { if (point[i] > maxs[i]) - dist[i] = point[i] - maxs[i] + dist[i] = point[i] - maxs[i]; else if (mins[i] > point[i]) - dist[i] = mins[i] - point[i] + dist[i] = mins[i] - point[i]; } - return vector_length(dist) + return vector_length(dist); } stock Float:fm_boxes_distance(const Float:mins1[3], const Float:maxs1[3], const Float:mins2[3], const Float:maxs2[3]) { - new Float:dist[3] + new Float:dist[3]; for (new i = 0; i < 3; ++i) { if (mins1[i] > maxs2[i]) - dist[i] = mins1[i] - maxs2[i] + dist[i] = mins1[i] - maxs2[i]; else if (mins2[i] > maxs1[i]) - dist[i] = mins2[i] - maxs1[i] + dist[i] = mins2[i] - maxs1[i]; } - return vector_length(dist) + return vector_length(dist); } stock Float:fm_distance_to_boxent(entity, boxent) { - new Float:point[3] - pev(entity, pev_origin, point) + new Float:point[3]; + pev(entity, pev_origin, point); - new Float:mins[3], Float:maxs[3] - pev(boxent, pev_absmin, mins) - pev(boxent, pev_absmax, maxs) + new Float:mins[3], Float:maxs[3]; + pev(boxent, pev_absmin, mins); + pev(boxent, pev_absmax, maxs); - return fm_distance_to_box(point, mins, maxs) + return fm_distance_to_box(point, mins, maxs); } stock Float:fm_boxents_distance(boxent1, boxent2) { - new Float:mins1[3], Float:maxs1[3] - pev(boxent1, pev_absmin, mins1) - pev(boxent1, pev_absmax, maxs1) + new Float:mins1[3], Float:maxs1[3]; + pev(boxent1, pev_absmin, mins1); + pev(boxent1, pev_absmax, maxs1); - new Float:mins2[3], Float:maxs2[3] - pev(boxent2, pev_absmin, mins2) - pev(boxent2, pev_absmax, maxs2) + new Float:mins2[3], Float:maxs2[3]; + pev(boxent2, pev_absmin, mins2); + pev(boxent2, pev_absmax, maxs2); - return fm_boxes_distance(mins1, maxs1, mins2, maxs2) + return fm_boxes_distance(mins1, maxs1, mins2, maxs2); } // projects a center of a player's feet base (originally by P34nut, improved) stock Float:fm_distance_to_floor(index, ignoremonsters = 1) { - new Float:start[3], Float:dest[3], Float:end[3] - pev(index, pev_origin, start) - dest[0] = start[0] - dest[1] = start[1] - dest[2] = -8191.0 + new Float:start[3], Float:dest[3], Float:end[3]; + pev(index, pev_origin, start); + dest[0] = start[0]; + dest[1] = start[1]; + dest[2] = -8191.0; - engfunc(EngFunc_TraceLine, start, dest, ignoremonsters, index, 0) - get_tr2(0, TR_vecEndPos, end) + engfunc(EngFunc_TraceLine, start, dest, ignoremonsters, index, 0); + get_tr2(0, TR_vecEndPos, end); - pev(index, pev_absmin, start) - new Float:ret = start[2] - end[2] + pev(index, pev_absmin, start); + new Float:ret = start[2] - end[2]; - return ret > 0 ? ret : 0.0 + return ret > 0 ? ret : 0.0; } // potential to crash (?) if used on weaponbox+weapon_* entity pair (use fm_remove_weaponbox instead) stock fm_kill_entity(index) { - set_pev(index, pev_flags, pev(index, pev_flags) | FL_KILLME) + set_pev(index, pev_flags, pev(index, pev_flags) | FL_KILLME); - return 1 + return 1; } // if weapon index isn't passed then assuming that it's the current weapon stock fm_get_user_weapon_entity(id, wid = 0) { - new weap = wid, clip, ammo + new weap = wid, clip, ammo; if (!weap && !(weap = get_user_weapon(id, clip, ammo))) - return 0 + return 0; - new class[32] - get_weaponname(weap, class, sizeof class - 1) + new class[32]; + get_weaponname(weap, class, sizeof class - 1); - return fm_find_ent_by_owner(-1, class, id) + return fm_find_ent_by_owner(-1, class, id); } // only weapon index or its name can be passed, if neither is passed then the current gun will be stripped stock bool:fm_strip_user_gun(index, wid = 0, const wname[] = "") { - new ent_class[32] + new ent_class[32]; if (!wid && wname[0]) - copy(ent_class, sizeof ent_class - 1, wname) + copy(ent_class, sizeof ent_class - 1, wname); else { - new weapon = wid, clip, ammo + new weapon = wid, clip, ammo; if (!weapon && !(weapon = get_user_weapon(index, clip, ammo))) - return false + return false; - get_weaponname(weapon, ent_class, sizeof ent_class - 1) + get_weaponname(weapon, ent_class, sizeof ent_class - 1); } - new ent_weap = fm_find_ent_by_owner(-1, ent_class, index) + new ent_weap = fm_find_ent_by_owner(-1, ent_class, index); if (!ent_weap) - return false + return false; - engclient_cmd(index, "drop", ent_class) + engclient_cmd(index, "drop", ent_class); - new ent_box = pev(ent_weap, pev_owner) + new ent_box = pev(ent_weap, pev_owner); if (!ent_box || ent_box == index) - return false + return false; - dllfunc(DLLFunc_Think, ent_box) + dllfunc(DLLFunc_Think, ent_box); - return true + return true; } // only weapon index or its name can be passed, if neither is passed then the current gun will be transferred stock bool:fm_transfer_user_gun(index1, index2, wid = 0, const wname[] = "") { - new ent_class[32] + new ent_class[32]; if (!wid && wname[0]) - copy(ent_class, sizeof ent_class - 1, wname) + copy(ent_class, sizeof ent_class - 1, wname); else { - new weapon = wid, clip, ammo + new weapon = wid, clip, ammo; if (!weapon && !(weapon = get_user_weapon(index1, clip, ammo))) - return false + return false; - get_weaponname(weapon, ent_class, sizeof ent_class - 1) + get_weaponname(weapon, ent_class, sizeof ent_class - 1); } - new ent_weap = fm_find_ent_by_owner(-1, ent_class, index1) + new ent_weap = fm_find_ent_by_owner(-1, ent_class, index1); if (!ent_weap) - return false + return false; - engclient_cmd(index1, "drop", ent_class) + engclient_cmd(index1, "drop", ent_class); - new ent_box = pev(ent_weap, pev_owner) + new ent_box = pev(ent_weap, pev_owner); if (!ent_box || ent_box == index1) - return false + return false; - set_pev(ent_box, pev_flags, pev(ent_box, pev_flags) | FL_ONGROUND) - dllfunc(DLLFunc_Touch, ent_box, index2) + set_pev(ent_box, pev_flags, pev(ent_box, pev_flags) | FL_ONGROUND); + dllfunc(DLLFunc_Touch, ent_box, index2); if (pev(ent_weap, pev_owner) != index2) - return false + return false; - return true + return true; } stock bool:fm_is_ent_visible(index, entity, ignoremonsters = 0) { - new Float:start[3], Float:dest[3] - pev(index, pev_origin, start) - pev(index, pev_view_ofs, dest) - xs_vec_add(start, dest, start) + new Float:start[3], Float:dest[3]; + pev(index, pev_origin, start); + pev(index, pev_view_ofs, dest); + xs_vec_add(start, dest, start); - pev(entity, pev_origin, dest) - engfunc(EngFunc_TraceLine, start, dest, ignoremonsters, index, 0) + pev(entity, pev_origin, dest); + engfunc(EngFunc_TraceLine, start, dest, ignoremonsters, index, 0); - new Float:fraction - get_tr2(0, TR_flFraction, fraction) + new Float:fraction; + get_tr2(0, TR_flFraction, fraction); if (fraction == 1.0 || get_tr2(0, TR_pHit) == entity) - return true + return true; - return false + return false; } // ported from AMXX's core get_user_origin(..., 3) (suggested by Greenberet) stock fm_get_aim_origin(index, Float:origin[3]) { - new Float:start[3], Float:view_ofs[3] - pev(index, pev_origin, start) - pev(index, pev_view_ofs, view_ofs) - xs_vec_add(start, view_ofs, start) + new Float:start[3], Float:view_ofs[3]; + pev(index, pev_origin, start); + pev(index, pev_view_ofs, view_ofs); + xs_vec_add(start, view_ofs, start); - new Float:dest[3] - pev(index, pev_v_angle, dest) - engfunc(EngFunc_MakeVectors, dest) - global_get(glb_v_forward, dest) - xs_vec_mul_scalar(dest, 9999.0, dest) - xs_vec_add(start, dest, dest) + new Float:dest[3]; + pev(index, pev_v_angle, dest); + engfunc(EngFunc_MakeVectors, dest); + global_get(glb_v_forward, dest); + xs_vec_mul_scalar(dest, 9999.0, dest); + xs_vec_add(start, dest, dest); - engfunc(EngFunc_TraceLine, start, dest, 0, index, 0) - get_tr2(0, TR_vecEndPos, origin) + engfunc(EngFunc_TraceLine, start, dest, 0, index, 0); + get_tr2(0, TR_vecEndPos, origin); - return 1 + return 1; } stock bool:fm_get_user_longjump(index) { - new value[2] - engfunc(EngFunc_GetPhysicsKeyValue, index, "slj", value, 1) + new value[2]; + engfunc(EngFunc_GetPhysicsKeyValue, index, "slj", value, 1); switch (value[0]) { - case '1': return true + case '1': return true; } - return false + return false; } stock fm_set_user_longjump(index, bool:longjump = true, bool:tempicon = true) { if (longjump == fm_get_user_longjump(index)) - return + return; if (longjump) { - engfunc(EngFunc_SetPhysicsKeyValue, index, "slj", "1") + engfunc(EngFunc_SetPhysicsKeyValue, index, "slj", "1"); if (tempicon) { - static msgid_itempickup + static msgid_itempickup; if (!msgid_itempickup) - msgid_itempickup = get_user_msgid("ItemPickup") + msgid_itempickup = get_user_msgid("ItemPickup"); - message_begin(MSG_ONE, msgid_itempickup, _, index) - write_string("item_longjump") - message_end() + message_begin(MSG_ONE, msgid_itempickup, _, index); + write_string("item_longjump"); + message_end(); } } else - engfunc(EngFunc_SetPhysicsKeyValue, index, "slj", "0") + engfunc(EngFunc_SetPhysicsKeyValue, index, "slj", "0"); } #define WEAPON_SUIT 31 stock bool:fm_get_user_suit(index) { - return bool:(!(!(pev(index, pev_weapons) & (1<iuser4 fields enum { @@ -78,8 +78,7 @@ enum { MASK_SELECTABLE = 268435456, // ??? MASK_PARASITED = 536870912, // Parasite flag MASK_SENSORY_NEARBY = 1073741824 // Sensory chamber in range - -} +}; enum { @@ -96,7 +95,7 @@ enum { CLASS_GESTATE, CLASS_DEAD, CLASS_NOTEAM -} +}; enum { WEAPON_NONE = 0, @@ -131,14 +130,14 @@ enum { WEAPON_STOMP, WEAPON_DEVOUR, WEAPON_MAX -} +}; enum { HIVETRAIT_NONE = 0, HIVETRAIT_DC = 92, HIVETRAIT_SC = 93, HIVETRAIT_MC = 94 -} +}; enum NSPS_VelShape { @@ -146,8 +145,7 @@ enum NSPS_VelShape NSPS_VS_BOX, NSPS_VS_SPHERE, NSPS_VS_BLOB - -} +}; /* Genshape used in ns_set_ps_genshape * NOTE: The following are in the ns.ps file but @@ -169,7 +167,7 @@ enum NSPS_GenShape NSPS_GS_DISC, NSPS_GS_RECTANGLE, NSPS_GS_NONE -} +}; enum NSPS_RenderMode { NSPS_R_NORMAL = 0, @@ -178,7 +176,7 @@ enum NSPS_RenderMode NSPS_R_GLOW, NSPS_R_TRANSALPHA, NSPS_R_ADDITIVE -} +}; enum NSPS_Flags { NSPS_FL_START_ON = 1, @@ -191,4 +189,4 @@ enum NSPS_Flags NSPS_FL_COLLIDE = 256, NSPS_FL_HI_DETAIL = 512, NSPS_FL_FACE_UP = 1024 -} +}; diff --git a/plugins/include/regex.inc b/plugins/include/regex.inc index e2c689c3..c56cfe66 100755 --- a/plugins/include/regex.inc +++ b/plugins/include/regex.inc @@ -131,4 +131,4 @@ native regex_substr(Regex:id, str_id, buffer[], maxLen); * * @note Do not use the handle again after freeing it! */ -native regex_free(&Regex:id); \ No newline at end of file +native regex_free(&Regex:id); diff --git a/plugins/include/svn_version.inc b/plugins/include/svn_version.inc index a18489db..884d2aea 100644 --- a/plugins/include/svn_version.inc +++ b/plugins/include/svn_version.inc @@ -13,4 +13,4 @@ #define AMXX_VERSION 1.80 #define AMXX_VERSION_NUM 180 -stock const AMXX_VERSION_STR[] = "1.8.0.3398" +stock const AMXX_VERSION_STR[] = "1.8.0.3398"; diff --git a/plugins/include/svn_version.tpl b/plugins/include/svn_version.tpl index 891c5a47..f3bdca52 100644 --- a/plugins/include/svn_version.tpl +++ b/plugins/include/svn_version.tpl @@ -13,4 +13,4 @@ #define AMXX_VERSION $PMAJOR$.$PMINOR$$PREVISION$ #define AMXX_VERSION_NUM $PMAJOR$$PMINOR$$PREVISION$ -stock const AMXX_VERSION_STR[] = "$PMAJOR$.$PMINOR$.$PREVISION$.$GLOBAL_BUILD$" +stock const AMXX_VERSION_STR[] = "$PMAJOR$.$PMINOR$.$PREVISION$.$GLOBAL_BUILD$"; diff --git a/plugins/include/tfcstats.inc b/plugins/include/tfcstats.inc index 252de8e8..eb118689 100755 --- a/plugins/include/tfcstats.inc +++ b/plugins/include/tfcstats.inc @@ -53,4 +53,3 @@ native get_stats(index,stats[8],bodyhits[8],name[],len); /* Returns number of all entries in stats. */ native get_statsnum(); - diff --git a/plugins/include/tfcx.inc b/plugins/include/tfcx.inc index 8e7817cd..73bff77c 100755 --- a/plugins/include/tfcx.inc +++ b/plugins/include/tfcx.inc @@ -27,7 +27,7 @@ enum { XMF_DAMAGE = 0, XMF_DEATH, -} +}; /* Use this function to register forwards */ native register_statsfwd( ftype ); diff --git a/plugins/include/time.inc b/plugins/include/time.inc index 5924b5d4..b76a275d 100644 --- a/plugins/include/time.inc +++ b/plugins/include/time.inc @@ -18,7 +18,7 @@ enum timeunit_hours, timeunit_days, timeunit_weeks, -} +}; // seconds are in each time unit #define SECONDS_IN_MINUTE 60 diff --git a/plugins/include/tsconst.inc b/plugins/include/tsconst.inc index 5e0927a0..a49ec5f1 100755 --- a/plugins/include/tsconst.inc +++ b/plugins/include/tsconst.inc @@ -91,7 +91,7 @@ enum { TSW_SKNIFE, TSW_KUNG_FU, TSW_TKNIFE, -} +}; /* valid tsweaponid in TS_GiveWeapon diff --git a/plugins/include/tsfun.inc b/plugins/include/tsfun.inc index 5fbb6a50..623df22a 100755 --- a/plugins/include/tsfun.inc +++ b/plugins/include/tsfun.inc @@ -18,7 +18,7 @@ enum { XMF_DAMAGE = 0, XMF_DEATH, -} +}; #if AMXX_VERSION_NUM >= 175 #pragma reqlib tsfun diff --git a/plugins/include/tsx.inc b/plugins/include/tsx.inc index 02c91c34..222b227a 100755 --- a/plugins/include/tsx.inc +++ b/plugins/include/tsx.inc @@ -26,7 +26,7 @@ enum { XMF_DAMAGE = 0, XMF_DEATH, -} +}; /* Use this function to register forwards * DEPRECATED diff --git a/plugins/include/vault.inc b/plugins/include/vault.inc index b95d8039..43a915cd 100755 --- a/plugins/include/vault.inc +++ b/plugins/include/vault.inc @@ -17,10 +17,10 @@ native get_vaultdata(const key[], data[] = "", len = 0); /* Sets a data under given key. */ -native set_vaultdata(const key[], const data[] = "" ); +native set_vaultdata(const key[], const data[] = ""); /* Removes a key from vault.*/ native remove_vaultdata(const key[]); /* Checks if a key exists in the vault.*/ -native vaultdata_exists(const key[]); \ No newline at end of file +native vaultdata_exists(const key[]);