Skip to content

Instantly share code, notes, and snippets.

View sharedptr2.cpp
/*
Author: Raúl Roa
Description
-----------
This program is meant to demonstrate how shared pointers allow for transfer of ownership.
Two lists contain a reference to the same pointer; remove operations are applied separately
and data integrity remains.
References
View ACF_DecoyGun
class ACF_DecoyGun extends UTWeapon;
/************************************************************************************
* States
***********************************************************************************/
var() class<ACF_Bot> BotClass;
var() bool Spawned;
simulated function InstantFire()
{
View ACF_Bot
class ACF_Bot extends ACF_Pawn;
/************************************************************************************
* Bot Globals
***********************************************************************************/
var int TeamNumber;
var() float BotSpawnTime;
var() bool StayAlive;
var ParticleSystem ProjExplosionTemplate;
View WithStrangeAeons.Dialog
--[[
Author: Raúl Roa
Date : 4/16/2013
]]
--[[ GLOBALS ]]
--[[ Time Management ]]
timeSteps = 0
View EventTarget polyfill
(function() {
if (!Event.prototype.preventDefault) {
Event.prototype.preventDefault=function() {
this.returnValue=false;
};
}
if (!Event.prototype.stopPropagation) {
Event.prototype.stopPropagation=function() {
this.cancelBubble=true;
};