Skip to content

Instantly share code, notes, and snippets.

local VIEW_SIZE = {400, 100}
local CLIENT_VIEW = {32, 32}
local SERVER_VIEW = {32, 264}
local CLIENT_SERVER_LAG = 250
local SERVER_RECONCILIATION = true
local CLIENT_SIDE_PREDICTION = true
local SERVER_UPDATE_RATE = 8 -- every 8 client updates the server sends state
local Entity = {}
Entity.__index = Entity
X = one minute spent downloading
Y = one minute spent extracting
streaming:
XXXXXXX | done
YYYYYYYYY------|
|
normal: |
|
$IsRoad["Brick32x32FRoadSData"] = 1;
$IsRoad["Brick32x32FRoadTData"] = 1;
$IsRoad["Brick32x32FRoadCData"] = 1;
$IsRoad["Brick32x32FRoadXData"] = 1;
if (!isObject(RoadGroup))
{
new SimSet(RoadGroup);
MissionCleanup.add(RoadGroup);
}
%diff = vectorNormalize(vectorSub(%this.currNode.position, %this.nextNode.position));
%vhx = getWord(%this.position, 0);
%vhy = getWord(%this.position, 1);
%ndx = getWord(%this.nextNode.position, 0);
%ndy = getWord(%this.nextNode.position, 1);
%pvx = getWord(%this.currNode.position, 0);
%pvy = getWord(%this.currNode.position, 1);
if (mAbs(getWord(%diff, 0)) == 1)
$IsRoad["Brick32x32FRoadSData"] = 1;
$IsRoad["Brick32x32FRoadTData"] = 1;
$IsRoad["Brick32x32FRoadCData"] = 1;
$IsRoad["Brick32x32FRoadXData"] = 1;
$IsRoad["Brick64x64AdvRoadStraightData"] = 1;
$IsRoad["Brick64x64AdvRoadIntersectionData"] = 1;
$IsRoad["Brick64x64AdvRoadCrosswalkData"] = 1;
$IsRoad["Brick64x64AdvRoadBlankData"] = 1;
function ShapeBase::findOpenings(%this, %distance)
{
%worldBox = %this.getWorldBox();
%vehicle = %this.getType() & $TypeMasks::VehicleObjectType;
%a1 = getWord(%worldBox, 2);
%a2 = getWord(%worldBox, 5);
%mask = $TypeMasks::PlayerObjectType | $TypeMasks::VehicleObjectType;
initContainerRadiusSearch(%this.getPosition(), %distance, %mask);
@qoh
qoh / irc.cs
Last active August 29, 2015 13:56
$IRC::UserName = "Test";
$IRC::RealName = "Test";
$IRC::RoomList = "#rtb2";
function BAM_IRC::connect(%this, %address)
{
Parent::connect(%this, %this.host @ ":" @ %this.port);
}
// ============================================================================
package MyPackage
{
function GameConnection::autoAdminCheck(%this)
{
%parent = Parent::autoAdminCheck(%this);
if (%parent)
{
return %parent;
}
deletevariables("$play::*");
$play::n[$play::n++] = 12 + 0;
$play::n[$play::n++] = 12 + 2;
$play::n[$play::n++] = 12 + 3;
$play::n[$play::n++] = 12 + 5;
$play::n[$play::n++] = 12 + 7;
$play::n[$play::n++] = 12 + 3;
$play::n[$play::n++] = 12 + 7;
function parseABC(%file)
{
if (!isFile(%file))
{
return 0;
}
%fo = new FileObject();
if (!%fo.openForRead(%file))