bugfix for not rendering the explosion vfx frame properly

This commit is contained in:
devZoGok
2023-12-02 12:15:54 +02:00
parent 97ab35086f
commit 59fbc87988
4 changed files with 6 additions and 6 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 38 KiB

+1
View File
@@ -127,6 +127,7 @@ namespace battleship{
assetManager->load(path + DEFAULT_TEXTURE);
sol::state_view SOL_LUA_STATE = generateView();
assetManager->load(path + (string)SOL_LUA_STATE["modelPrefix"], true);
assetManager->load(path + "Textures/", true);
int numPlayers = SOL_LUA_STATE[mapTable]["numPlayers"];
string playerInd = "players";
+1 -1
View File
@@ -558,7 +558,7 @@ namespace battleship{
AppStateType::MAP_EDITOR,
configData::calcSumBinds(AppStateType::MAP_EDITOR, true),
configData::calcSumBinds(AppStateType::MAP_EDITOR, false),
GameManager::getSingleton()->getPath() + "Scripts/options.lua"){
GameManager::getSingleton()->getPath() + scripts[ScriptFiles::OPTIONS]){
mapName = name;
mapSize = size;
this->newMap = newMap;
+4 -5
View File
@@ -187,14 +187,12 @@ namespace battleship{
string p[numFrames];
for(int i = 0; i < numFrames; i++)
p[i] = GameManager::getSingleton()->getPath() + "Textures/Explosion/explosion0" + to_string(7) + ".png";
p[i] = GameManager::getSingleton()->getPath() + "Textures/Explosion/explosion07.png";
Texture *tex = new Texture(numFrames, p, false);
Texture *tex = new Texture(p, numFrames, false);
Material *mat = new Material(root->getLibPath() + "particle");
mat->addVec4Uniform("startColor", Vector4(1, 1, 1, 1));
mat->addVec4Uniform("endColor", Vector4(1, 1, 0, 1));
mat->addTexUniform("tex", tex, false);
mat->addTexUniform("tex", tex, true);
ParticleEmitter *pe = new ParticleEmitter(1);
pe->setMaterial(mat);
@@ -202,6 +200,7 @@ namespace battleship{
pe->setHighLife(3);
pe->setSize(10 * Vector2::VEC_IJ);
pe->setSpeed(0);
Node *node = new Node(pos + Vector3(0, 2, 0));
node->attachParticleEmitter(pe);
node->lookAt(Vector3::VEC_J, Vector3::VEC_K);