武装突袭3

武装突袭3

Call of Duty 4 - Modern Warfare [RU]
此主题已被锁定
Leopard20 2019 年 11 月 11 日 上午 9:35
Fixing friendly fire
To make sure the player doesn't take damage from friendly fire, just add a "handleDamage" event handler to the player which returns 0 damage if the instigator is friendly (something like this):
player addEventHandler ["HandleDamage", { _unit = _this#0; _damage = _this#2; _firing = _this#6; if ([side _firing, side _unit] call BIS_fnc_sideIsFriendly) then {_damage = 0}; _damage }];
最后由 Leopard20 编辑于; 2019 年 11 月 11 日 上午 11:59
< >
正在显示第 1 - 2 条,共 2 条留言
▽ Eriks0n  [开发者] 2019 年 11 月 11 日 上午 9:52 
:D
Oookay, I'll try to implement.
▽ Eriks0n  [开发者] 2019 年 11 月 11 日 上午 11:55 
Thanks, it works. Checked on the "Crew expendable" mission. Soon the rest of the mission will put this code.
< >
正在显示第 1 - 2 条,共 2 条留言
每页显示数: 1530 50