Skip to content

Instantly share code, notes, and snippets.

View Fusselwurm's full-sized avatar
🥸

Moritz Schmidt Fusselwurm

🥸
View GitHub Profile
@Fusselwurm
Fusselwurm / querySelector.js
Created January 30, 2013 14:39
document.querySelector, document.querySelectorAll for IE7
/*global document */
/**
* define document.querySelector & document.querySelectorAll for IE7
*
* A not very fast but small hack. The approach is taken from
* http://weblogs.asp.net/bleroy/archive/2009/08/31/queryselectorall-on-old-ie-versions-something-that-doesn-t-work.aspx
*
*/
(function () {
var
@Fusselwurm
Fusselwurm / private-in-loops.sqf
Last active April 28, 2022 09:47
`private` is important to use in nested for loops
// not using private for `_i`
_x = "";
for [{_i = 1}, {_i <=2}, {_i = _i + 1}] do {
_x = _x + "o";
for [{_i = 1}, {_i <= 2}, {_i = _i + 1}] do {
_x = _x + "i";
};
};
20:19:00 Error in expression <turretPath = _this select 1;
if (count _turretPath > 1) then
{
_turretConfigPat>
20:19:00 Error position: <_turretPath > 1) then
{
_turretConfigPat>
20:19:00 Error Undefined variable in expression: _turretpath
20:19:00 File gm\gm_core\gm_core_vehicles\data\functions\gm_core_vehicles_fnc_turretPathToTurretConfigPath.sqf..., line 6
@Fusselwurm
Fusselwurm / fix_honking_poc.sqf
Last active December 19, 2021 11:05
Fix vehicle honking: Proof of Concept
// mit **playSound3D**
// PROBLEM Sound bleibt an der generierten Stelle kleben
removeAllUserActionEventHandlers ["DefaultAction", "Activate"];
xxx_eh = addUserActionEventHandler ["DefaultAction", "Activate", {
xxx_honking_id = [
{
playSound3D [
"a3\sounds_f\weapons\horns\MRAP_02_horn_2.wss",
// für alle lösungen: vanilla stummschalten
class CfgWeapons {
class Default;
class CarHorn: Default {
drySound[] = {"",1,1};
};
};
@Fusselwurm
Fusselwurm / gist:6988b7fcf60b56633e3b2a0110af416a
Last active September 23, 2021 20:42
feedback baafest erster Abend

done:

  • grad_replay updaten, irgendwas is putt mit colors (grad_replay_intercept erwartet GRAD_REPLAY_COLORS global on server)
  • vermutl bug beim retaliationzivi erstellen, siehe serverlog (userInit.sqf#119, im ccreateUnit)

Bugs fixen:

  • prevent eigene KI AK nehmen oder eigene KI rausnehmen. und im BFT ordentlich benennen
  • respawn cars didnt work in first match. why?
  • prevent independent from following players to the city as long as not retaliating!!! am besten komplett static. evtl auch von anfang an feindl
@Fusselwurm
Fusselwurm / gruppe-adler-concept-sbs.md
Last active September 21, 2021 19:30
Slotting Bounty System (SBS)

Slotting Bounty System (SBS)

Motivation

Some roles tend to stay open for a long time, some roles are taken the instant the slotting goes online. We want some system that equals the playing field and

  • incentivizes players to cover all roles
  • prevents slot sniping
  • gives everyone a chance to play their preferred role

grad-civs: population zones & transit traffic

step by step

enable grad-civs

addon settings: enable grad-civs

just for debugging purposes, choose to show civilians on map

@Fusselwurm
Fusselwurm / gherkin.xml
Created May 16, 2013 08:32
gherkin syntax highlighting for kde/katepart. not of my making, but copied from http://paste.kde.org/184712/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!--
Gherkin (English) syntax highlighting definition for Kate.
Copyright (C) 2011 by Torbjörn Klatt (opensource@torbjoern-klatt.de)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@Fusselwurm
Fusselwurm / crash_sqflint.sqf
Last active June 20, 2020 18:52
this is a good way to crash sqflint in sqf/analyzer.py#361
#define X(var) var
X(X("foo"));