Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F629778
Rewind.pl
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
Rewind.pl
View Options
use
strict
;
$
::
RewindInterwal
=
10
;
#
Save
every
10
th
game
tick
$
::
RewindMax
=
200
;
#
Must
be
a
multiple
of
$
RewindInterwal
%::RewindData = ();
sub
ResetRewind
()
{
%::RewindData = ();
}
sub
MakeRewindData
()
{
my
(
$
doodadrewind
,
$
doodad
,
$
rewinddata
);
$
doodadrewind
=
[];
foreach
$
doodad
(
@::
Doodads
)
{
push
@
{
$
doodadrewind
},
(
$
doodad->
RewindData
()
);
}
$
rewinddata
=
{
gametick
=>
$
::gametick
,
fighter1
=>
$
::
Fighter1
->
RewindData
(),
fighter2
=>
$
::
Fighter2
->
RewindData
(),
doodads
=>
$
doodadrewind
,
bgx
=>
$
::bgx
,
bgy
=>
$
::bgy
,
bgspeed
=>
$
::
BgSpeed
,
bgposition
=>
$
::
BgPosition
,
over
=>
$
::over
,
ko
=>
$
::ko
,
quakeamplitude
=>
$
::
QuakeAmplitude
,
quakeoffset
=>
$
::
QuakeOffset
,
quakex
=>
$
::
QuakeX
,
quakey
=>
$
::
QuakeY
,
input1
=>
$
::
Input1
->
RewindData
(),
input2
=>
$
::
Input2
->
RewindData
(),
};
$
::
RewindData
{
$
::gametick
}
=
$
rewinddata
;
delete
$
::
RewindData
{
$
::gametick
-
$
::
RewindMax
};
}
sub
RewindTo
(
$
)
{
my
(
$
rewindto
)
=
@
_
;
my
(
$
rewinddata
);
$
rewindto
=
(
int
(
$
rewindto
/
$
::
RewindInterwal
)
*
$
::
RewindInterwal
);
#/
$
rewinddata
=
$
::
RewindData
{
$
rewindto
};
return
unless
defined
$
rewinddata
;
$
::gametick
=
$
rewinddata->
{
gametick
};
$
::
Fighter1
=
$
rewinddata->
{
fighter1
};
$
::
Fighter2
=
$
rewinddata->
{
fighter2
};
@::
Doodads
=
@
{
$
rewinddata->
{
doodads
}};
$
::bgx
=
$
rewinddata->
{
bgx
};
$
::bgy
=
$
rewinddata->
{
bgy
};
$
::
BgSpeed
=
$
rewinddata->
{
bgspeed
};
$
::
BgPosition
=
$
rewinddata->
{
bgposition
};
$
::over
=
$
rewinddata->
{
over
};
$
::ko
=
$
rewinddata->
{
ko
};
$
::
QuakeAmplitude
=
$
rewinddata->
{
quakeamplitude
};
$
::
QuakeOffset
=
$
rewinddata->
{
quakeoffset
};
$
::
QuakeX
=
$
rewinddata->
{
quakex
};
$
::
QuakeY
=
$
rewinddata->
{
quakey
};
$
::
Input1
=
$
rewinddata->
{
input1
};
$
::
Input2
=
$
rewinddata->
{
input2
};
}
1
;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 15, 7:45 AM (22 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
143365
Default Alt Text
Rewind.pl (1 KB)
Attached To
Mode
R76 OpenMortal
Attached
Detach File
Event Timeline