Coder Social home page Coder Social logo

mcfw's People

Contributors

bastientanesie avatar geelik avatar klausman avatar mrpvtdagger avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mcfw's Issues

Call to undefined function "f_fnc_nearplayer"

While toying with murk, I came across a few errors and find out that there is still a call to f_fnc_nearplayer which was removed by the commit 6510196.

Murk comes with a fn_nearPlayerGround which does almost the same thing, so I'll try to mix the two functions into a single one named f_fnc_nearplayer.

Reproduction steps

  • Split repo
  • Default framework v0.2.4 on Altis
  • Place a CSAT rifle squad in a town and give them a "LAMBS Garrison" waypoint
  • Place a simple trigger (round, 250m radius) with "any player" as activation
  • In the init script on the squad leader unit: [this, false, "once", 1, 15, "", 15, 200] execVM "murk\murk_spawn.sqf";

Here's the two errors I got:

14:33:33 Error in expression <n {
_pNear = [leader _group,_dist] call f_fnc_nearplayer;
};
if (!_pNear) exitWi>
14:33:33   Error position: <f_fnc_nearplayer;
};
if (!_pNear) exitWi>
14:33:33   Error Undefined variable in expression: f_fnc_nearplayer
14:33:33 File [...]\mpmissions\mcfw-0-2-4.Altis\murk\murk_spawn.sqf..., line 364
14:33:33 Error in expression <p,_dist] call f_fnc_nearplayer;
};
if (!_pNear) exitWith {_sleep = 0;};
};
sleep>
14:33:33   Error position: <_pNear) exitWith {_sleep = 0;};
};
sleep>
14:33:33   Error Undefined variable in expression: _pnear
14:33:33 File [...]\mpmissions\mcfw-0-2-4.Altis\murk\murk_spawn.sqf..., line 366

Findings

I tried the following init scripts on the unit:

  • [this, false, "once"] execVM "murk\murk_spawn.sqf";
  • [this, false, "once", 1, 5, ""] execVM "murk\murk_spawn.sqf";
  • [this, false, "once", 1, 5, "", 5] execVM "murk\murk_spawn.sqf";
  • 🟥 [this, false, "once", 1, 5, "", 5, 200] execVM "murk\murk_spawn.sqf";

The errors are triggered when the last "remove distance" is used, which matches the lines in murk_spawn.sqf.

First fix

Replacing the call to f_fnc_nearPlayer at line 364 by murk_fnc_nearPlayerGround works.

Improve the ticket-based respawn system

There's a few bits and edge cases in the system that could be bothering for players and/or mission makers, depending on the situation.

Here's a list of what could be improved :

  • Add the ability to disable ticket-loss for specific units
  • Detect if Safe Start is enabled and disable ticket-loss while it is
  • Find a way to switch back players in their regular state when tickets are added but people are still in Spectator mode
  • Make the system work for all sides (currently blufor only)

Calling mission endings from the map menu doesn't work

As a logged-in admin, I tried to end a running mission via the "admin" section of the map menu.

The different endings configured in description.ext show up ok, but clicking on it doesn't do anything. The source are located in f_briefing_admin.sqf on line 53:

  • f_fnc_mpEnd is no longer documented and is probably deprecated, and its %1 is incorrect
  • BIS_fnc_MP has been deprecated since Arma 1.50

I'll make a pull request with a fix based on remoteExecCall BIS_fnc_endMission.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.