Jump to content
Ola Holtan

camera executing on all Mp clients

Recommended Posts

Hi i am having some problems with my mod forcing camera on other players not just me belive the problem is in this sqf

/*
 * itc_land_spike_fnc_fired
 */

params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
//player addmagazine _magazine;
itc_land_spike_currentMissile = _projectile;
itc_land_spike_launchTime = cba_missionTime;
itc_land_spike_activationTime = cba_missionTime;
itc_land_spike_wobble = [if (random 1 > 0.5) then [{-1},{1}], 5 + (random 10), (round (random 3)) * 0.25];
private _viewASL = AGLtoASL positionCameraToWorld [0,0,0];
private _intersect = [AGLtoASL positionCameraToWorld [0,0,0], _viewASL vectorFromTo (AGLtoASL positionCameraToWorld [0,0,1])] call itc_land_spike_fnc_intersectScreenToWorld;
if (!isNil "_intersect" && {(_intersect distance player) > 500}) then {
	itc_land_spike_targetPos = _intersect;
	itc_land_spike_targetPosCamera = _intersect;
} else {
	private _forward = AGLtoASL (player modelToWorld [0,3000,0]);
	itc_land_spike_targetPos = _forward;
	itc_land_spike_targetPosCamera = _forward;
};

[] call itc_land_spike_fnc_startCamera;
[] call itc_land_spike_fnc_missile;

Any help is apreciated

Share this post


Link to post
Share on other sites

@Harzach first of they are no longer suporting ITC and have given permition for anyone to reuplod/chang theyr mod, this was never released
i know this is not my mod i forgot to put creddits in here

i have fixed multiple bugs with the mod allready 

Share this post


Link to post
Share on other sites

Well, in that case, I would first look at replacing all instances of "player" with the param "_unit". Not sure how this gets called, but I'd have to imagine the params are defined for a reason.

 

"Player" is best avoided in MP scripting for reasons exactly like this.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×