Skip to content

Instantly share code, notes, and snippets.

@cmann1
cmann1 / PropsWind.cpp
Created January 3, 2018 17:44
DustMod Prop Wind Script
const float DT = 1.0 / 60;
class script
{
[text] PropsWind props_wind;
array<controllable@> players;
int num_players;
script()
@cmann1
cmann1 / EntityOutliner.cpp
Last active December 23, 2018 07:36
DustMod Entity Outline Script
const int ATTACK_TYPE_IDLE = 0;
float lerp(float a, float b, float x)
{
return a * (1.0 - x) + b * x;
}
class script : callback_base
{
#include 'math.cpp';
class RainbowStream : trigger_base
{
scene@ g;
scripttrigger@ self;
sprites@ star_spr;
[position,mode:world,layer:19,y:start_y] float start_x;
class script
{
}
class InstancedSprite : trigger_base
{
scene@ g;
scripttrigger@ self;
  • General:
    • Fixed login spinner not spinning
    • Fixed wrong page showing when selecting your name on character leaderboards
    • Fixed leaderboards not loading after searching in a tome
    • Fixed interacting with score sheet when main menu is open
    • Fixed some score sheet elements rendering above main menu
    • Fixed slow downs after saving or loading state multiple times
  • Editor:
    • Fixed colour picker rendering behind other UI
    • Fixed clicking other UI through colour picker
  • General:
    • Fix save/load state related crash
    • Fix unloaded entities still being detected by end flags in Dustmod
    • Fix DX12 device error
    • Fix segments overwriting checkpoint when unloading
    • Fix player movement FX positions when player is scaled
    • Fix weird tome scroll behaviour when using arrow keys after searching
    • Fix score screen not shown for OOB/unload
    • OOB/Unload now works on dustmod maps
    • Door/tome titles will no longer overlap in multiplayer - only the title for the active camera is drawn
/*
- Selection:
- Uses prop bounding boxes
- Shift + ctrl to snap to whole tiles instead of half tiles
- Props and entities are snapped by whole tiles if any tiles are selected
- Shift + ctrl to rotate in 5 degree increments
- Props:
- Scaled props stay centred under the mouse
- Ctrl + scroll will no longer skip layers and can also cycle between backdrop layers
- Scroll and shift or scroll and ctrl + shift to rotate props in 5 and 1 degree increments