Jump to content

pedeathtrian

Member
  • Content Count

    282
  • Joined

  • Last visited

  • Medals

Everything posted by pedeathtrian

  1. pedeathtrian

    Russia General

    Yeah. I can confirm. Unfortunately most people think something like "Putin did so much for Russia", "If not Putin, then who?", and even "No Putin -- No Russia" as said by Vyacheslav Volodin, first vice of Chief of Staff of the Presidential Executive Office, the man who actually runs domestic policy in RF. Not a surprise people think this way, considering authorities have all the media at their hands. And they even think they can control Russian part of the Internet. LMAO. Some people just don't see alternatives (and there are none in mainstream, i.e. in approachable information field), some just tired of shocks happened in latest decades. Sentiments after Stalin and/or USSR/communism are actually not after them, and mostly not after ideology. They are after the order existed in those times. Lower crime rates, almost no corruption, social lifts, stable future and so on. None of these are exclusive attributes of communism. But this is somehow hard to understand. So, in general, that Putin's support is fake. If only people knew all the truth... Most of romanians "supported" CeauÅŸescu. Then what? But for Putin this story will not be that short. I hope for extremely open process, with long and detailed testimonies available to everyone, so that all the truth comes out. That probably involves high-ranks from other countries, sorry guys. Some heart attacks can occur. As for the risk, that was a joke. But, according to russian proverb, "every joke is only partly a joke". Russian laws are selective. And stupid. And controversial. And unable to follow. You can apply them to almost everyone in RF. So yes, if they somehow want me to go to jail, thay actually can arrange some actions. Luckily, they have completely no system in it. Look what they persecute for. Reposts in groups of what? ten users? "Dangerous" posts with ten likes? One reposter of tens of thousands of the same post? It's like winning a lottery. I also think they can't just ask BIS for my credentials as they can with VK and other sevices that store personal data in RF (according to Russian laws). And from other side, conviction of such kind will never be a bad spot in biography. Not for me. Of course I don't go to street with poster, since this time it's a real risk, despite that article 31 of Russian Constitution clearly says "Citizens of Russian federation have right to gather peacefully without weapons, arrange gatherings (sorry for repeat, sounds better in russian), meetings and demonstrations, marches and piquets." Period. Article 15 section 1 says "Constitution of Russian Federation has the highest legal force, direct action, and applies on all territory of Russian Federation. Laws and other legal acts, adopted in Russian Federation must not contradict Constitution of Russian Federation". Period. Then parliament adopts a law (federal law No.54-FZ) obliging me to inform local authorities about my planned actions, planned route, amount of participators, do it in short term from 15 to 10 days before action (so I can't just go for meeting next day after someone killed Boris Nemtsov) and so on. Then if I get permission (which is unlikely) I can go through police corridor in my free country. Wait, what? Constitution arcticle didn't have any reference to any other laws, it's the law of direct action. Clearly this anti-constitutional law shouldn't be signed in the first place by... Putin, the guarantee of constitution in RF. Isn't Putin a criminal then? Of course, it's only one small episode, but is usually enough to convince opponent (that Putin is a criminal; not saying about economical crimes, here I have no proof). Sigh. Situation here gets more tense day by day. The Revolution is coming (not a joke; also, not a communistic one; also, it does not require support of most people), there are groups of people already preparing it. This time none of people taking any posts in any state orgnizations will be left in their places. Clearly representative democracy does not work well anywhere, it doesn't work at all in Russia. The goal is direct democracy.
  2. pedeathtrian

    Russia General

    I had history classes in school and in university (2004) in Russia and it all said the same. Hitler and Stalin divided Europe and annexed corresponding parts. And that Stalin was going to start a war against Hitler in 1942 and so on. The important detail people usually miss is that Molotov-Ribbentrop Pact was a secret agreement arranged with soviet people knowing nothing about it (unfortunately this happens when you have dictatorship). It was never a will of russian people to annex these lands. So please, say Stalin did this, Stalin did that, or communists did, not russians. It's funny how it also applies to Putin (Putin annexed Crimea, not russians (oh, wait, +10 years in gulag for saying this, Okay.jpg)). Russians are very peaceful people (they are!), so please lower rate of hate and disrespect to them, and direct it to concrete personalities. Thx. I don't know what they teach nowadays, but I definitely don't like what is going on in media and in country in general. Anyway this is going to end soon (very soon!) PS. Please, don't report this post to KGB, I have plans for next two years other than sitting in prison.
  3. The first and essential thing to do is to check if IP address your router gets from ISP is worldwide accessible. Then (if it is) there's some sense in port forwarding or uPnP. Checking external IP only makes no sense -- it might show ISP's NAT IP address; in that case your server will not be accessible from the Internet by this address. If (and only if) your router get the same IP address as what's-my-ip-address services show you, then you can set up port forwarding or uPnP (which is same port forwarding, only done by applications demand); see instructions in previous posts. Check your router's status page for something like "WAN IP Address" or so. If it belongs to private networks (e.g. 10.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12) you have no chance to run server accessible from the Internet.
  4. pedeathtrian

    UK leaves Europe

    Right. It's not nationalism. But nationalism is an easy solution for some problems. Get the trend. Extrapolate. If/when people will see their salvation in ultra-right (or ultra-anything) measures, they will for sure democratically vote for it. If you disagree -- change the trend. I don't see it happening yet.
  5. pedeathtrian

    UK leaves Europe

    The trend is that you will have your new Hitler(s) eventually. The difference is this time you're on your own. There will be no commies to withstand this new threat. Don't expect any help from US either. The whole world would stay at your borders and watch while nazi (or whatever form it will take) beast reverts you to medieval. As I see it, there will be absolutely no limits for them. Counter-modern at its best. What you will get is by far worse than medieval age. In medieval age people have had at least some progress. What you will get is regress only.
  6. No limitations on 2d/3d or slope areas. // returns true if position of _unit is inside real bound box of _obj PDTH_pointIsInBox = { params ["_unit","_obj"]; _uPos = _obj worldToModel (getPos _unit); _oBox = boundingBoxReal _obj; _inHelper = { params ["_pt0", "_pt1"]; (_pt0 select 0 <= _pt1 select 0) && (_pt0 select 1 <= _pt1 select 1) && (_pt0 select 2 <= _pt1 select 2) } ([_oBox select 0, _uPos] call _inHelper) && ([_uPos, _oBox select 1] call _inHelper) }; // returns distance between position of _unit and closest point suface of _obj's real // bound box (i.e. closest vertex, edge or point in bb's face). // returns 0 if inside or exactly on surface PDTH_distance2Box = { params ["_unit","_obj"]; _uPos = _obj worldToModel (getPos _unit); _oBox = boundingBoxReal _obj; _pt = [0, 0, 0]; { if (_x < (_oBox select 0 select _forEachIndex)) then { _pt set [_forEachIndex, (_oBox select 0 select _forEachIndex) - _x]; } else { if ((_oBox select 1 select _forEachIndex) < _x) then { _pt set [_forEachIndex, _x - (_oBox select 1 select _forEachIndex)]; } } } forEach _uPos; _pt distance [0, 0, 0] };
  7. Intersection task is much much heavier than finding point-to-box relation. The more you go in row "curve to curve", "curve to surface", "surface to surface" the heavier it gets. It can seem an easier task for user script (having engine caclulating stuff), but still a lof more work to be done with intersections and it is not going anywhere.
  8. pedeathtrian

    Standalone GUI Dialog Editor

    Your question is based on false proposition. ArmA 3 has ports for Linux and Mac, though older versions than for Win. Should be "who needs crossplatform support for multi-platform game?" Minority, probably, but definitely not nobody. I have successfully edited (i.e. unpacked, edited and packed; using mikero tools for Linux) missions on Linux; had those mission run on dedicated server on Linux; and played them with other Linux and Mac players. Unfortunately, we don't have a full stack of editing and content creation tools available on Linux and/or Mac, otherwise we would have had more serious modders and mission makers nowadays. Not everything can be done in text editor. Some other problems are also persist, even for players. Like, up-to-date BIS tools create up-to-date ArmA content which is incompatible with not-so-up-to-date ArmA 3 Linux and Mac versions, so you can't use new mods (e.g. p3d files version 70 in CUP mods and others). New missions contain new commands and cannot be run on older versions of ArmA, and so on. And I had an urge to fix stuff but found lack of required tools discouraging. Dat feeling when you know what to do and how to do, but you are not going to install Win because of it. So yes, there are people who could use some crossplatform support.
  9. Unfortunately, my ArmA 1.54 does not start because "Bad version 70 in p3d file ....". Is it really worth cutting off all Mac and Linux Users? I'm not encouraging anyone to keep some backwards compatibility or something. I just wonder what's the killer feature. I've seen too much bleeding-edge obsession (in other fields) that really gave nothing. Where can people find previous versions of CUP mods? Thanks.
  10. pedeathtrian

    co10 Escape

    Unfortunately, incompatible with 1.54 :\
  11. pedeathtrian

    Find a random position on radial

    Dude, you're overcomplicating too much :D This _theta = ((2 * pi * _i)/300) * (180/pi); _phi = acos((2 * (random 1)) - 1); can be easily simplified to _theta = 1.2 * _i; // 360 * _i / 300; _phi = random 180; Though the second line gives different distribution of points. Random with one argument gives even distribution. But when acos is applied to it, you'll have non-even distribution, see pic below (left part). One might probably want even distribution of angles (right part) instead of values passed to acos. It will also remove unnecessary back and forth calculation of acos and cos on the same value. If, for some reasons, even distribution for acos argument is what you've always wanted, you can use something like: _cosPhi = -1 + random 2; _sinPhi = sqrt(1-_cosPhi*_cosPhi); Not meant to be the most ideal solution either :)
  12. pedeathtrian

    MP levelling/xp system

    I'd save only total player exp since all other parameters can be calculated from it. They simply does not contain any new information. So you can store total exp, but show (calculated) progress for only next level-up. Let's continue example from previous post. Player has 450 points of experience (50 points ahead of level 3). Their level is calculated to be 3. Exp for levels 3 and 4 are 400 and 900 respectively (500 points for level-up). So you show 50/500. The only value to store is 450.
  13. pedeathtrian

    MP levelling/xp system

    This is cruel, assuming that Most games use square root curve, that is level = floor(k * sqrt (exp)), where k is some constant. Given nth level, required expn = (n / k)2 And k is just 1 divided by square root of amount of exp required for 1st level-up: k = sqrt(1 / exp1) I assumed you start with level 0, which is most like not the case. For starting with level 1 replace n with n-1 where needed: level = floor(1+ k * sqrt (exp)); expn = ((n-1) / k)2 Let's say you start with level 1 and 100 exp points required to gain 2nd level. Then k = 0.1. Required exp for levels 2,3,4,10: exp2 = ((2-1) / 0.1)2 = 100; exp3 = ((3-1) / 0.1)2 = 400; exp4 = ((4-1) / 0.1)2 = 900; exp10 = ((10-1) / 0.1)2 = 8100; Assuming player has 450 points of experience, his level will be: level(450) = floor(1+ 0.1 * sqrt (450)) = floor (1+2.121) = 3;
  14. The "MPKilled" must be used in conjunction with the addMPEventHandler command.
  15. pedeathtrian

    Find a random position on radial

    Trigonometric functions in Arma take degrees as arguments. For compass directions (clockwise, from y axis) see the right part of figure in my post above (with β as an angle). That's not stupid, that's the best solution in the thread :)
  16. pedeathtrian

    Binary Search Algorithm.

    Replace _locNamePosArr set [count _locNamePosArr, _locationName]; _locNamePosArr set [count _locNamePosArr, _locationPos]; with _locNamePosArr pushBack [_locationName, _locationPos]; and you will have your dictionary (and use BIS_fnc_findInPairs on it). Which in turn duplicates the contents of _locPosArr and _islandNamesArr. You could use find on _islandNamesArr to find an index which you then can use in _locPosArr and abandon _locNamePosArr totally (or vice versa). _nearbyLocations = nearestLocations [getPos player, text _locTypeArr, 100000]; I don't get the point of text in this line; and in general, using nearestLocations might be overkill here, and probably it's better to get everything from config. Unless you use the "sorted-by-distance" property of nearestLocations' return (which is invalidated the moment player starts to move).
  17. pedeathtrian

    Find a random position on radial

    Just in case you still need some high scool maths :)
  18. pedeathtrian

    Binary Search Algorithm.

    Y U NO put each location in separate array item? [[String, Array], [String, Array]...] instead of [string, Array, String, Array, ...]? You can't use binary search on array you've posted above. _indexReturn = {_x == _requestedElement} count _array; This does not do what you think it does. It is not find, it's count. It returns amount of elements equal to _requestedElement, not their position. So 0 if there's no such element, or 1 if you have only one, and so on. It also have linear complexity on array's length, and is called on every while's iteration, so even if you were correctly comparing _mid to some index, it would give you N log N complexity. Why not just use find then? It has linear. If you somehow have index of required item, you don't need the binary search already. Even when you have all array items in the form [string, Array], and search using String key, you will need lessthan operator called on key values (Strings, _mid key and requested key), not indexes. And comparing strings is yet some code to call (and write). Taking everything in account, you will need thousands of items in array to win something with binary search against simple BIS_fnc_findInPairs call.
  19. pedeathtrian

    onMapSingleClick, openMap & inputAction conditions.

    That's only because it does not allow cancelling teleport and uses forced map. Otherwise the concept is the same. I also checked the openMap command both with one boolean argument and array (for forced) and forceMap command. All of them don't show map if player does not have one. Should be checked too.
  20. pedeathtrian

    onMapSingleClick, openMap & inputAction conditions.

    You can use global boolean variable to allow onMapSingleClick handle rto teleport player to position and ignore it otherwise. map_teleport_enabled = false; map_click_handler = [ "map_teleport", "onMapSingleClick", { if (map_teleport_enabled) then { player setPos _pos; // _pos is predefined for onMapSingleClick systemChat format ["Teleported to map position; %1", _pos]; map_teleport_enabled = false; openMap false; }; }, nil ] call BIS_fnc_addStackedEventHandler; _id = _target addAction [ "Teleport to position on map", { map_teleport_enabled = true; if (!visibleMap) then { // will probably need to check if player has map, and use forceMap if he doesn't openMap true; waitUntil {visibleMap}; }; mapCenterOnCamera ((findDisplay 12) displayCtrl 51); waitUntil {!visibleMap}; if (map_teleport_enabled) then { systemChat "Teleport to map position cancelled."; }; map_teleport_enabled = false; }, nil, 0.5, false, true ]; If teleport is allowed, then close the map from handler and forbid teleport. So when player opens map by pressing M he will not be teleported when clicked on map. When action is activated, it allows handler to teleport player. Notice that if user did not teleport and closed the map, action checks for this case and disables teleporting on its own.
  21. Gravity force is dependent on mass, but acceleration is not. So bullet drop does not depend on bullet mass, and can be calculated for any mass using g=9.81m/s2.
  22. CfgMagazines' subentries have ammo. _air_fric = getNumber(configfile >> "CfgAmmo" >> (currentMagazine player) >> "airFriction"); should be _air_fric = getNumber(configFile >> "CfgAmmo" >> getText(configFile >> "CfgMagazines" >> (currentMagazine player) >> "ammo") >> "airFriction");
  23. pedeathtrian

    SQF generate UNIX timestamp?

    No need to write stored procedures for it. MySQL already has UNIX_TIMESTAMP, which for your needs will be used like UNX_TIMESTAMP(NOW()). However, I would higly recommend you not using unix timestamps in SQF unless you're OK with its ~2 minute precision (and not 1 second like you might think). The reason is Arma Number type which is C float type, which has only 24 (23 real +1 implied) bits for significant orders in floating point numbers. That means you can precisely present integral numbers up to 16777216 (224), then you got only even numbers, then only 4x, then 8x and so on. At numbers like 1458868810 (the time I'm writing this) you can only present timestamps with interval of 128 seconds! If you're OK with that, then continue, but I would personally offload all datetime operations (and probably all accounting) for database (and MySQL has lots of functions for that). BTW, for the same reason Array and String types have treir size limits, you simply cannot address every array element or char in a string after 16M2. 9999999 was chosen probably because it's easier to remember for humans.
  24. CfgAmmo subentries have airFriction, which descriptions looks very much like it's acceleration applied to projectile by air resistance force (so its mass already counted). Not sure about units though. It also could be just coefficient applied to projectile's speed on each simulation step.
  25. Check this out: CfgWeapons Config Reference: initSpeed. So if this value is greater than zero, you simply take it. Otherwise you take value from CfgMagazines' subentry's "initSpeed" and multiply it by initSpee's absolute value. Also, take any muzzle attachments into account, e.g. check for getNumber(configfile >> "CfgWeapons" >> "muzzle_snds_H" >> "ItemInfo" >> "MagazineCoef" >> "initSpeed") if you have such attachment and multyply your speed by this parameter.
×