Sgt Smash

Wood cutting

7 posts in this topic

Advertisement

A buddy of mine and I had the same happening to us on one server on certain trees. We haven not dug deeper to figure out what could be potentially causing this.

Share this post


Link to post
Share on other sites

I am only having the issue on Tanoa with certain jungle trees. I think it may have something to do with the fix implemented on Potato where they changed where the logs pile up for you?  Just a thought. 

Share this post


Link to post
Share on other sites

Just had a look in ExileServer_object_tree_network_chopTreeRequest.sqf and the only thing changed is the _weaponHolderPosition (where loot is placed).

_weaponHolderPosition = [_treePosition, _spawnRadius] call ExileClient_util_math_getRandomPositionInCircle;

Instead of spawning it in a radius around the tree it now gets the players ATL position and spawns it there.

_weaponHolderPosition = getPosATL _player;

One line has been removed and im not sure if that would have anything to do with it as not really sure what it does.

_weaponHolderPosition set [2, 0];

Anyhow if you want to use the old way this is the code from 0.9.8

Spoiler

/**
 * ExileServer_object_tree_network_chopTreeRequest
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_sessionId","_parameters","_treeNetId","_tree","_isTree","_player","_treeHeight","_newDamage","_treePosition","_spawnRadius","_weaponHolders","_weaponHolder","_weaponHolderPosition"];
_sessionId = _this select 0;
_parameters = _this select 1;
_treeNetId = _parameters select 0;
try 
{
	_tree = objectFromNetId _treeNetId;
	if (isNull _tree) then 
	{
		throw format ["Cannot chop unknown tree! %1", _treeNetId];
	};
	if !(alive _tree) then 
	{
		throw "Cannot chop already chopped tree!";
	};
	_isTree = [_tree, "WoodSource"] call ExileClient_util_model_isInteraction;
	if !(_isTree) then 
	{
		throw "Can only chop down trees, you twat!";
	};
	_player = _sessionId call ExileServer_system_session_getPlayerObject;
	if (isNull _player) then 
	{
		throw "Unknown players cannot chop trees!";
	};
	if !(alive _player) then 
	{
		throw "The dead cannot chop down trees!";
	};
	if ((_player distance _tree) > 30) then 
	{
		throw "No long distance tree chopping! Nope!";
	};
	_treeHeight = _tree call ExileClient_util_model_getHeight;
	_treeHeight = _treeHeight max 1; 
	_newDamage = ((damage _tree) + (1 / (floor _treeHeight) )) min 1;
	_tree setDamage _newDamage; 
	if (_newDamage isEqualTo 1) then
	{
		_tree setDamage 999; 
	};
	_treePosition = getPosATL _tree;
	_treePosition set[2, 0];
	_spawnRadius = 3;
	_weaponHolders = nearestObjects[_treePosition, ["GroundWeaponHolder"], _spawnRadius];
	_weaponHolder = objNull;
	if (_weaponHolders isEqualTo []) then
	{
		_weaponHolderPosition = [_treePosition, _spawnRadius] call ExileClient_util_math_getRandomPositionInCircle;
		_weaponHolderPosition set [2, 0];
		_weaponHolder = createVehicle ["GroundWeaponHolder", _weaponHolderPosition, [], 0, "CAN_COLLIDE"];
		_weaponHolder setPosATL _weaponHolderPosition;
	}
	else 
	{
		_weaponHolder = _weaponHolders select 0;
	};
	_weaponHolder addMagazineCargoGlobal ["Exile_Item_WoodLog", 1];
}
catch 
{
	_exception call ExileServer_util_log;
};
true

 

 

Share this post


Link to post
Share on other sites

On Tanoa, most (jungle, palm) trees give separate weapon holders for each log. The more 'ordinary' looking ones work fine. Will screenshot next time I'm in.

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.