--- /dev/null
+// Example configuration file, my personal bindings - Xolatile.
+// This file will be executed every time the game is ran.
+
+exec custommapsmenu.cfg // Wide custom maps menu.
+
+bind e [setweapon 1] // Shotgun.
+bind q [setweapon 2] // Chaingun.
+bind LCTRL [setweapon 3] // Rocket launcher.
+bind r [setweapon 4] // Rifle.
+bind LALT [setweapon 5] // Grenade launcher.
+bind f [setweapon 6] // Pistol.
+bind LSHIFT [setweapon 0] // Chainsaw.
+
+bind m [showcustommaps] // Unofficial custom maps.
+bind n [showgui maps] // Official maps.
+
+editbind SPACE [floatspeed 1200; onrelease [floatspeed 120]] // Float fast in edit mode when space is held.
+editbind LALT [history 0] // Repeat last executed command in edit mode.
+
+// bind MOUSE2 [togglezoom] // Commented it out, I don't use 2 binds below, it's just an example.
+
+bind MOUSE2 [setweapon 5; attack 1; onrelease weapon] // Shoot quick rocket on right button.
+bind MOUSE3 [setweapon 5; attack 1; onrelease weapon] // Shoot quick grenade on middle button.
+
+hudscore 1 // Show HUD score.
+ammobar 1 // Show HUD ammo bar.
+gameclock 1 // Show HUD game clock.
--- /dev/null
+// Custom map menu, ported from Sauerbraten, 7Year aka Xolatile.
+
+octabase = "^f7"
+octamain = "^f1"
+unmapsx = 4
+unmapsy = 24
+
+custommaps = ""
+
+loopfiles curmap "packages/maps" "ogz" [
+ if (< (indexof $allmaps $curmap) 0) [
+ custommaps = (concat $custommaps $curmap)
+ ]
+]
+
+sy_nume = (listlen $custommaps)
+
+showcustommaps = [sy_remaps; showgui sy_unmaps]
+
+sy_remaps = [
+ custommaps = ""
+ loopfiles curmap "packages/maps" "ogz" [
+ if (< (indexof $allmaps $curmap) 0) [
+ custommaps = (concat $custommaps $curmap)
+ ]
+ ]
+ custommaps = (sortlist $custommaps x y [<=s $x $y])
+ amountxy = (+ (div (listlen $custommaps) $unmapsy) 1)
+ loop syxy $amountxy [
+ (concatword "custommaps" $syxy) = ""
+ ]; syxy = 0
+ loop syxy $amountxy [
+ (concatword "custommaps" $syxy)
+ loop unto $unmapsy [
+ (concatword "custommaps" $syxy) = (concat $(concatword "custommaps" $syxy) (at $custommaps (+ (* $unmapsy $syxy) $unto)))
+ ]
+ ]; syxy = 0; unto = 0
+ sy_nume = (listlen $custommaps)
+]
+
+newgui sy_unmaps [
+ if (mod $amountxy $unmapsx) [
+ sy_unpage = (+ (div $amountxy $unmapsx) 1)
+ ] [
+ sy_unpage = (div $amountxy $unmapsx)
+ ]
+ loop syi $sy_unpage [
+ guilist [
+ loop syj $unmapsx [
+ if (< (+ (* $syi $unmapsx) $syj) $amountxy) [
+ guistrut $unmapsy 1
+ guilist [
+ guistrut 27 1
+ looplist unto $(concatword "custommaps" (+ (* $syi $unmapsx) $syj )) [
+ guibutton (concatword $octabase $unto) (concat map $unto) "cube"
+ ]
+ ]
+ ]
+ ]
+ guibar
+ if (< (+ (* $syi $unmapsx) $syj) $amountxy) [
+ guiimage (concatword "packages/maps/" (strreplace $guirolloveraction "map " "") ".jpg") $guirolloveraction 6 1 "data/cube.png"
+ ]
+ ]
+ if (= (+ $syi 1) $sy_unpage) [
+
+ ] [
+ guitab (concatword $octamain (+ $syi 2))
+ ]
+ ]
+] (concatword $octamain "Custom Maps (" $sy_nume ")")
{
case GUN_FIST:
if(d->type==ENT_PLAYER && chainsawhudgun) sound = S_CHAINSAW_ATTACK;
+ //~if(d->quadmillis)
+ //~particle_splash(PART_FLAME, 60, 300, vec(0).sub(from), 0x802010, 0.24f);
break;
case GUN_SG:
particle_flare(d->muzzle, d->muzzle, 200, PART_MUZZLE_FLASH3, 0xFFFFFF, 2.75f, d);
loopi(guns[gun].rays)
{
+ if(d->quadmillis)
+ particle_trail(PART_FLAME, 400, hudgunorigin(gun, from, rays[i], d), rays[i], 0x802010, 0.6f, 36);
particle_splash(PART_SPARK, 20, 250, rays[i], 0xB49B4B, 0.24f);
particle_flare(hudgunorigin(gun, from, rays[i], d), rays[i], 300, PART_STREAK, 0xFFC864, 0.28f);
if(!local) adddecal(DECAL_BULLET, rays[i], vec(from).sub(rays[i]).safenormalize(), 2.0f);
case GUN_PISTOL:
{
particle_splash(PART_SPARK, 200, 250, to, 0xB49B4B, 0.24f);
+ if(d->quadmillis)
+ particle_trail(PART_FLAME, 400, hudgunorigin(gun, from, to, d), to, 0x802010, 0.6f, 36);
particle_flare(hudgunorigin(gun, from, to, d), to, 600, PART_STREAK, 0xFFC864, 0.28f);
if(muzzleflash && d->muzzle.x >= 0)
particle_flare(d->muzzle, d->muzzle, gun==GUN_CG ? 100 : 200, PART_MUZZLE_FLASH1, 0xFFFFFF, gun==GUN_CG ? 2.25f : 1.25f, d);
}
case GUN_RL:
+ if(d->quadmillis)
+ particle_trail(PART_FLAME, 400, hudgunorigin(gun, from, to, d), to, 0x802010, 0.6f, 36);
if(muzzleflash && d->muzzle.x >= 0)
particle_flare(d->muzzle, d->muzzle, 250, PART_MUZZLE_FLASH2, 0xFFFFFF, 3.0f, d);
pspeed = guns[gun].projspeed;
case GUN_RIFLE:
particle_splash(PART_SPARK, 200, 250, to, 0xB49B4B, 0.24f);
- particle_trail(PART_SMOKE, 500, hudgunorigin(gun, from, to, d), to, 0x404040, 0.6f, 20);
+ if(d->quadmillis)
+ particle_trail(PART_FLAME, 400, hudgunorigin(gun, from, to, d), to, 0x802010, 0.6f, 36);
+ particle_trail(PART_SMOKE, 500, hudgunorigin(gun, from, to, d), to, 0x404040, 0.6f, 18);
if(muzzleflash && d->muzzle.x >= 0)
particle_flare(d->muzzle, d->muzzle, 150, PART_MUZZLE_FLASH3, 0xFFFFFF, 1.25f, d);
if(!local) adddecal(DECAL_BULLET, to, vec(from).sub(to).safenormalize(), 3.0f);