SuperTuxKart 1.5 upstream source (from official release tarball)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: Wilber library for SuperTuxKart
|
||||
Upstream-Contact: Benau
|
||||
Source: https://supertuxkart.net
|
||||
|
||||
Files:
|
||||
*.spm
|
||||
*.xml
|
||||
Copyright:
|
||||
Copyright 2016 "GeekPenguinBR" and "TuxKartDriver"
|
||||
Copyright 2017 Benau
|
||||
License: CC-BY-SA 3.0
|
||||
|
||||
Files:
|
||||
scripting.as
|
||||
Copyright 2017 Benau
|
||||
License: CC-BY-SA 3.0
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- Generated with script from SVN rev 17016 -->
|
||||
<scene>
|
||||
<lod>
|
||||
<group name="_single_lod_stklib_wilbertSecurity_a_main">
|
||||
<static-object lod_distance="100" lod_group="_single_lod_stklib_wilbertSecurity_a_main" model="stklib_wilbertSecurity_a_main.spm" xyz="0.00 0.00 -0.00" hpr="0.0 -0.0 0.0" scale="1.00 1.00 1.00" interaction="ghost" skeletal-animation="true" geometry-level="1"/>
|
||||
</group>
|
||||
</lod>
|
||||
<object id="stklib_wilberSecurity_a_physics" type="animation" xyz="0.00 0.00 0.00" hpr="0.0 -0.0 0.0" scale="1.00 1.00 1.00" interaction="physicsonly" shape="box" model="stklib_wilberSecurity_a_physics.spm" skeletal-animation="false" geometry-level="1">
|
||||
</object>
|
||||
<object id="stklib_wilbertSecurity_a_main" type="animation" xyz="0.00 0.00 -0.00" hpr="0.0 -0.0 0.0" scale="1.00 1.00 1.00" looped="y" interaction="ghost" lod_instance="true" lod_group="_single_lod_stklib_wilbertSecurity_a_main" model="stklib_wilbertSecurity_a_main.spm" skeletal-animation="true" geometry-level="1">
|
||||
</object>
|
||||
</scene>
|
||||
@@ -0,0 +1,55 @@
|
||||
namespace stklib_wilbertSecurity_a
|
||||
{
|
||||
// Frame 0 to 20 is "calm down" animation
|
||||
// Frame 21 to 48 is handstand animation
|
||||
// Frame 49 to 190 is painting animation, used in stklib_wilberPainter_a
|
||||
void onStart(const string instID)
|
||||
{
|
||||
array<Track::TrackObject@>@ tl = Track::getTrackObjectList();
|
||||
Track::TrackObject@ wilber_obj = null;
|
||||
Track::Mesh@ wilber_mesh = null;
|
||||
for (uint i = 0; i < tl.length(); i++)
|
||||
{
|
||||
if (tl[i].getName() == "stklib_wilbertSecurity_a_main.spm")
|
||||
{
|
||||
// Originally wilber animation ends at 190 totally
|
||||
if (tl[i].getMesh() !is null &&
|
||||
tl[i].getMesh().getAnimationSetFrames().length() == 2 &&
|
||||
tl[i].getMesh().getAnimationSetFrames()[0] == 0 &&
|
||||
tl[i].getMesh().getAnimationSetFrames()[1] == 190)
|
||||
{
|
||||
@wilber_obj = @tl[i];
|
||||
@wilber_mesh = @tl[i].getMesh();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (wilber_mesh !is null && wilber_obj.getParentLibrary() !is null)
|
||||
{
|
||||
// Try to see if this wilber is used by a meta library
|
||||
// wilber_obj is the wilber .spm in wilber library, so 2
|
||||
// getParentLibrary() will do the job
|
||||
Track::TrackObject@ meta =
|
||||
wilber_obj.getParentLibrary().getParentLibrary();
|
||||
if (meta !is null)
|
||||
{
|
||||
if (meta.getName() == "stklib_wilberPainter_a")
|
||||
{
|
||||
wilber_mesh.removeAllAnimationSet();
|
||||
wilber_mesh.addAnimationSet(49, 190);
|
||||
wilber_mesh.useAnimationSet(0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (wilber_mesh !is null)
|
||||
{
|
||||
// If wilber is used alone, use random animation set
|
||||
wilber_mesh.removeAllAnimationSet();
|
||||
wilber_mesh.addAnimationSet(0, 20);
|
||||
wilber_mesh.addAnimationSet(21, 48);
|
||||
wilber_mesh.useAnimationSet(Utils::randomInt(0, 2));
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 121 KiB |
Reference in New Issue
Block a user