Exemple #1
0
        public override Model getRotatedModel()
        {
            Model model = aSpotAnim_1592.getModel();

            if (model == null)
            {
                return(null);
            }
            int j = -1;

            if (aSpotAnim_1592.aAnimation_407 != null)
            {
                j = aSpotAnim_1592.aAnimation_407.anIntArray353[frameIndex];
            }
            Model model_1 = new Model(true, Class36.method532(j), false, model);

            if (j != -1)
            {
                model_1.method469();
                model_1.method470(j);
                model_1.anIntArrayArray1658 = null;
                model_1.anIntArrayArray1657 = null;
            }
            if (aSpotAnim_1592.anInt410 != 128 || aSpotAnim_1592.anInt411 != 128)
            {
                model_1.method478(aSpotAnim_1592.anInt410, aSpotAnim_1592.anInt410,
                                  aSpotAnim_1592.anInt411);
            }
            model_1.method474(pitch);
            model_1.method479(64 + aSpotAnim_1592.anInt413,
                              850 + aSpotAnim_1592.anInt414, -30, -50, -30, true);
            return(model_1);
        }
Exemple #2
0
        public override Model getRotatedModel()
        {
            if (desc == null)
            {
                return(null);
            }
            Model model = method450();

            if (model == null)
            {
                return(null);
            }
            base.height = model.modelHeight;
            if (base.anInt1520 != -1 && base.anInt1521 != -1)
            {
                SpotAnim spotAnim = SpotAnim.cache[base.anInt1520];
                Model    model_1  = spotAnim.getModel();
                model_1.isGfx = true;
                if (model_1 != null)
                {
                    int   j         = spotAnim.aAnimation_407.anIntArray353[base.anInt1521];
                    int   nextFrame = spotAnim.aAnimation_407.anIntArray353[base.nextGraphicsAnimationFrame];
                    int   cycle1    = spotAnim.aAnimation_407.anIntArray355[base.anInt1521];
                    int   cycle2    = base.anInt1522;
                    Model model_2   = new Model(true, Class36.method532(j), false, model_1);
                    model_2.isGfx = true;
                    model_2.method475(0, -base.anInt1524, 0);
                    model_2.method469();
                    model_2.method470(j, nextFrame, cycle1, cycle2);
                    model_2.anIntArrayArray1658 = null;
                    model_2.anIntArrayArray1657 = null;
                    if (spotAnim.anInt410 != 128 || spotAnim.anInt411 != 128)
                    {
                        model_2.method478(spotAnim.anInt410, spotAnim.anInt410, spotAnim.anInt411);
                    }
                    model_2.method479(64 + spotAnim.anInt413, 850 + spotAnim.anInt414, -30, -50, -30, true);
                    Model[] aModel =
                    {
                        model, model_2
                    };
                    model       = new Model(aModel);
                    model.isGfx = true;
                }
            }
            if (desc.aByte68 == 1)
            {
                model.aBoolean1659 = true;
            }
            return(model);
        }
Exemple #3
0
        public Model method209(int j, int k, bool flag)
        {
            Model model;

            if (flag)
            {
                model = method206(anInt255, anInt256);
            }
            else
            {
                model = method206(anInt233, mediaID);
            }
            if (model == null)
            {
                return(null);
            }
            if (k == -1 && j == -1 && model.triangleColourOrTexture == null)
            {
                return(model);
            }
            Model model_1 = new Model(true, Class36.method532(k) & Class36.method532(j), false, model);

            if (k != -1 || j != -1)
            {
                model_1.method469();
            }
            if (k != -1)
            {
                model_1.method470(k);
            }
            if (j != -1)
            {
                model_1.method470(j);
            }
            model_1.method479(64, 768, -50, -10, -50, true);
            return(model_1);
        }
Exemple #4
0
        private Model method581(int j, int k, int l)
        {
            Model model = null;
            long  l1;

            if (anIntArray776 == null)
            {
                if (j != 10)
                {
                    return(null);
                }
                l1 = (long)((type << 8) + l) + ((long)(k + 1) << 32);
//				Model model_1 = (Model) mruNodes2.insertFromCache(l1);
//				if(model_1 != null)
//					return model_1;
                if (anIntArray773 == null)
                {
                    return(null);
                }
                bool flag1 = aBoolean751 ^ (l > 3);
                int  k1    = anIntArray773.Length;
                if (k1 > 3)
                {
                    Debug.Log("Too high? " + k1);
                    k1 = 3;
                }
                for (int i2 = 0; i2 < k1; i2++)
                {
                    int l2 = anIntArray773[i2];
                    if (flag1)
                    {
                        l2 += 0x10000;
                    }
                    model = null;                    //model = (Model) mruNodes1.insertFromCache(l2);
                    if (model == null)
                    {
                        model = Model.method462(l2 & 0xffff);
                        if (model == null)
                        {
                            return(null);
                        }
                        if (flag1)
                        {
                            model.method477();
                        }
                        //mruNodes1.removeFromCache(model, l2);
                    }
                    if (k1 > 1)
                    {
                        aModelArray741s[i2] = model;
                    }
                }
                if (k1 > 1)
                {
                    model = new Model(k1, aModelArray741s);
                }
            }
            else
            {
                int i1 = -1;
                for (int j1 = 0; j1 < anIntArray776.Length; j1++)
                {
                    if (anIntArray776[j1] != j)
                    {
                        continue;
                    }
                    i1 = j1;
                    break;
                }
                if (i1 == -1)
                {
                    return(null);
                }
                l1 = (long)((type << 8) + (i1 << 3) + l) + ((long)(k + 1) << 32);
//				Model model_2 = (Model) mruNodes2.insertFromCache(l1);
//				if(model_2 != null)
//					return model_2;
                int  j2    = anIntArray773[i1];
                bool flag3 = aBoolean751 ^ (l > 3);
                if (flag3)
                {
                    j2 += 0x10000;
                }
                model = null;                //(Model) mruNodes1.insertFromCache(j2);
                if (model == null)
                {
                    model = Model.method462(j2 & 0xffff);
                    if (model == null)
                    {
                        return(null);
                    }
                    if (flag3)
                    {
                        model.method477();
                    }
                    //mruNodes1.removeFromCache(model, j2);
                }
            }
            bool flag;

            flag = anInt748 != 128 || anInt772 != 128 || anInt740 != 128;
            bool flag2;

            flag2 = anInt738 != 0 || anInt745 != 0 || anInt783 != 0;
            Model model_3 = new Model(modifiedModelColors == null, Class36.method532(k), l == 0 && k == -1 && !flag && !flag2, model);

            if (k != -1)
            {
                model_3.method469();
                model_3.method470(k);
                model_3.anIntArrayArray1658 = null;
                model_3.anIntArrayArray1657 = null;
            }
            while (l-- > 0)
            {
                model_3.method473();
            }
            if (modifiedModelColors != null && originalModelColors != null)
            {
                for (int k2 = 0; k2 < modifiedModelColors.Length; k2++)
                {
                    model_3.method476(modifiedModelColors[k2], originalModelColors[k2]);
                }
            }
            if (flag)
            {
                model_3.method478(anInt748, anInt740, anInt772);
            }
            if (flag2)
            {
                model_3.method475(anInt738, anInt745, anInt783);
            }
            model_3.method479(64, 830, -90, -480, -70, !aBoolean769);
            if (anInt760 == 1)
            {
                model_3.anInt1654 = model_3.modelHeight;
            }
            //mruNodes2.removeFromCache(model_3, l1);
            return(model_3);
        }
Exemple #5
0
        public Model method164(int j, int k, int[] ai)
        {
            if (childrenIDs != null)
            {
                EntityDef entityDef = method161();
                if (entityDef == null)
                {
                    return(null);
                }
                else
                {
                    return(entityDef.method164(j, k, ai));
                }
            }
            Model model = (Model)mruNodes.insertFromCache(type);

            if (model == null)
            {
                bool flag = false;
                for (int i1 = 0; i1 < models.Length; i1++)
                {
                    if (!Model.method463(models[i1]))
                    {
                        flag = true;
                    }
                }

                if (flag)
                {
                    return(null);
                }
                Model[] aclass30_sub2_sub4_sub6s = new Model[models.Length];
                for (int j1 = 0; j1 < models.Length; j1++)
                {
                    aclass30_sub2_sub4_sub6s[j1] = Model.method462(models[j1]);
                }

                if (aclass30_sub2_sub4_sub6s.Length == 1)
                {
                    model = aclass30_sub2_sub4_sub6s[0];
                }
                else
                {
                    model = new Model(aclass30_sub2_sub4_sub6s.Length,
                                      aclass30_sub2_sub4_sub6s);
                }
                if (originalModelColors != null)
                {
                    for (int k1 = 0; k1 < originalModelColors.Length; k1++)
                    {
                        model.method476(originalModelColors[k1],
                                        modifiedModelColors[k1]);
                    }
                }
                model.method469();
                model.method479(64 + anInt85, 850 + anInt92, -30, -50, -30, true);
                mruNodes.removeFromCache(model, type);
            }
            Model model_1 = Model.aModel_1621;

            model_1.method464(model, Class36.method532(k) & Class36.method532(j));
            if (k != -1 && j != -1)
            {
                model_1.method471(ai, j, k);
            }
            else if (k != -1)
            {
                model_1.method470(k);
            }
            if (anInt91 != 128 || anInt86 != 128)
            {
                model_1.method478(anInt91, anInt91, anInt86);
            }
            model_1.method466();
            model_1.anIntArrayArray1658 = null;
            model_1.anIntArrayArray1657 = null;
            if (aByte68 == 1)
            {
                model_1.aBoolean1659 = true;
            }
            return(model_1);
        }
Exemple #6
0
        public override Model getRotatedModel()
        {
//			Model model = aSpotAnim_1568.getModel();
//			if (model == null)
//				return null;
//			int j = aSpotAnim_1568.aAnimation_407.anIntArray353[anInt1569];
//			Model model_1 = new Model(true, Class36.method532(j), false, model);
//			if (!aBoolean1567)
//			{
//				model_1.method469();
//				model_1.method470(j);
//				model_1.anIntArrayArray1658 = null;
//				model_1.anIntArrayArray1657 = null;
//			}
//			if (aSpotAnim_1568.anInt410 != 128 || aSpotAnim_1568.anInt411 != 128)
//				model_1.method478(aSpotAnim_1568.anInt410, aSpotAnim_1568.anInt410, aSpotAnim_1568.anInt411);
//			if (aSpotAnim_1568.anInt412 != 0)
//			{
//				if (aSpotAnim_1568.anInt412 == 90)
//					model_1.method473();
//				if (aSpotAnim_1568.anInt412 == 180)
//				{
//					model_1.method473();
//					model_1.method473();
//				}
//				if (aSpotAnim_1568.anInt412 == 270)
//				{
//					model_1.method473();
//					model_1.method473();
//					model_1.method473();
//				}
//			}
//			model_1.method479(64 + aSpotAnim_1568.anInt413, 850 + aSpotAnim_1568.anInt414, -30, -50, -30, true);
//			return model_1;
            Model model = aSpotAnim_1568.getModel();

            if (model == null)
            {
                return(null);
            }
            int j = aSpotAnim_1568.aAnimation_407.anIntArray353[anInt1569];
            //int nextFrame1 = aSpotAnim_1568.aAnimation_407.anIntArray353[nextFrame];
            int   cycle1  = aSpotAnim_1568.aAnimation_407.anIntArray355[anInt1569];
            Model model_1 = new Model(true, Class36.method532(j), false, model);

            if (!aBoolean1567)
            {
                model_1.method469();
                model_1.method470(j);                //, nextFrame1, cycle1, anInt1570);
                model_1.anIntArrayArray1658 = null;
                model_1.anIntArrayArray1657 = null;
            }
            if (aSpotAnim_1568.anInt410 != 128 || aSpotAnim_1568.anInt411 != 128)
            {
                model_1.method478(aSpotAnim_1568.anInt410, aSpotAnim_1568.anInt410, aSpotAnim_1568.anInt411);
            }
            if (aSpotAnim_1568.anInt412 != 0)
            {
                if (aSpotAnim_1568.anInt412 == 90)
                {
                    model_1.method473();
                }
                if (aSpotAnim_1568.anInt412 == 180)
                {
                    model_1.method473();
                    model_1.method473();
                }
                if (aSpotAnim_1568.anInt412 == 270)
                {
                    model_1.method473();
                    model_1.method473();
                    model_1.method473();
                }
            }
            model_1.method479(64 + aSpotAnim_1568.anInt413, 850 + aSpotAnim_1568.anInt414, -30, -50, -30, true);
            return(model_1);
        }
Exemple #7
0
        public Model method452()
        {
            if (desc != null)
            {
                int j = -1;
                if (base.anim >= 0 && base.anInt1529 == 0)
                {
                    j = Animation.anims[base.anim].anIntArray353[base.anInt1527];
                }
                else
                if (base.anInt1517 >= 0)
                {
                    j = Animation.anims[base.anInt1517].anIntArray353[base.anInt1518];
                }
                Model model = desc.method164(-1, j, null);
                return(model);
            }
            long l  = aLong1718;
            int  k  = -1;
            int  i1 = -1;
            int  j1 = -1;
            int  k1 = -1;

            if (base.anim >= 0 && base.anInt1529 == 0)
            {
                Animation animation = Animation.anims[base.anim];
                k = animation.anIntArray353[base.anInt1527];
                if (base.anInt1517 >= 0 && base.anInt1517 != base.anInt1511)
                {
                    i1 = Animation.anims[base.anInt1517].anIntArray353[base.anInt1518];
                }
                if (animation.anInt360 >= 0)
                {
                    j1 = animation.anInt360;
                    l += j1 - equipment[5] << 40;
                }
                if (animation.anInt361 >= 0)
                {
                    k1 = animation.anInt361;
                    l += k1 - equipment[3] << 48;
                }
            }
            else
            if (base.anInt1517 >= 0)
            {
                k = Animation.anims[base.anInt1517].anIntArray353[base.anInt1518];
            }
            Model model_1 = (Model)mruNodes.insertFromCache(l);

            if (model_1 == null)
            {
                bool flag = false;
                for (int i2 = 0; i2 < 12; i2++)
                {
                    int k2 = equipment[i2];
                    if (k1 >= 0 && i2 == 3)
                    {
                        k2 = k1;
                    }
                    if (j1 >= 0 && i2 == 5)
                    {
                        k2 = j1;
                    }
                    if (k2 >= 256 && k2 < 512 && !IDK.cache[k2 - 256].method537())
                    {
                        flag = true;
                    }
                    if (k2 >= 512 && !ItemDef.forID(k2 - 512).method195(anInt1702))
                    {
                        flag = true;
                    }
                }

                if (flag)
                {
                    if (aLong1697 != -1L)
                    {
                        model_1 = (Model)mruNodes.insertFromCache(aLong1697);
                    }
                    if (model_1 == null)
                    {
                        return(null);
                    }
                }
            }
            if (model_1 == null)
            {
                Model[] aclass30_sub2_sub4_sub6s = new Model[12];
                int     j2 = 0;
                for (int l2 = 0; l2 < 12; l2++)
                {
                    int i3 = equipment[l2];
                    if (k1 >= 0 && l2 == 3)
                    {
                        i3 = k1;
                    }
                    if (j1 >= 0 && l2 == 5)
                    {
                        i3 = j1;
                    }
                    if (i3 >= 256 && i3 < 512)
                    {
                        Model model_3 = IDK.cache[i3 - 256].method538();
                        if (model_3 != null)
                        {
                            aclass30_sub2_sub4_sub6s[j2++] = model_3;
                        }
                    }
                    if (i3 >= 512)
                    {
                        Model model_4 = ItemDef.forID(i3 - 512).method196(anInt1702);
                        if (model_4 != null)
                        {
                            aclass30_sub2_sub4_sub6s[j2++] = model_4;
                        }
                    }
                }
                model_1 = new Model(j2, aclass30_sub2_sub4_sub6s);
                for (int j3 = 0; j3 < 5; j3++)
                {
                    if (anIntArray1700[j3] != 0)
                    {
                        model_1.method476(UnityClient.anIntArrayArray1003[j3][0], UnityClient.anIntArrayArray1003[j3][anIntArray1700[j3]]);
                        if (j3 == 1)
                        {
                            model_1.method476(UnityClient.anIntArray1204[0], UnityClient.anIntArray1204[anIntArray1700[j3]]);
                        }
                    }
                }

                model_1.method469();
                model_1.method479(64, 850, -30, -50, -30, true);
                mruNodes.removeFromCache(model_1, l);
                aLong1697 = l;
            }
            if (aBoolean1699)
            {
                return(model_1);
            }
            Model model_2 = Model.aModel_1621;

            model_2.method464(model_1, Class36.method532(k) & Class36.method532(i1));
            if (k != -1 && i1 != -1)
            {
                model_2.method471(Animation.anims[base.anim].anIntArray357, i1, k);
            }
            else
            if (k != -1)
            {
                model_2.method470(k);
            }
            model_2.method466();
            model_2.anIntArrayArray1658 = null;
            model_2.anIntArrayArray1657 = null;
            return(model_2);
        }
Exemple #8
0
        public override Model getRotatedModel()
        {
            if (!visible)
            {
                return(null);
            }
            Model model = method452();

            if (model == null)
            {
                return(null);
            }
            base.height        = model.modelHeight;
            model.aBoolean1659 = true;
            model.Render317    = true;
            if (aBoolean1699)
            {
                return(model);
            }
            if (base.anInt1520 != -1 && base.anInt1521 != -1)
            {
                SpotAnim spotAnim = SpotAnim.cache[base.anInt1520];
                Model    model_2  = spotAnim.getModel();
                if (model_2 != null)
                {
                    Model model_3 = new Model(true, Class36.method532(base.anInt1521), false, model_2);
                    model_3.method475(0, -base.anInt1524, 0);
                    model_3.method469();
                    model_3.method470(spotAnim.aAnimation_407.anIntArray353[base.anInt1521]);
                    model_3.anIntArrayArray1658 = null;
                    model_3.anIntArrayArray1657 = null;
                    if (spotAnim.anInt410 != 128 || spotAnim.anInt411 != 128)
                    {
                        model_3.method478(spotAnim.anInt410, spotAnim.anInt410, spotAnim.anInt411);
                    }
                    model_3.method479(64 + spotAnim.anInt413, 850 + spotAnim.anInt414, -30, -50, -30, true);
                    Model[] aclass30_sub2_sub4_sub6_1s =
                    {
                        model, model_3
                    };
                    model = new Model(aclass30_sub2_sub4_sub6_1s);
                }
            }
            if (aModel_1714 != null)
            {
                if (UnityClient.loopCycle >= anInt1708)
                {
                    aModel_1714 = null;
                }
                if (UnityClient.loopCycle >= anInt1707 && UnityClient.loopCycle < anInt1708)
                {
                    Model model_1 = aModel_1714;
                    model_1.method475(anInt1711 - (int)base.x, anInt1712 - anInt1709, anInt1713 - (int)base.y);
                    if (base.turnDirection == 512)
                    {
                        model_1.method473();
                        model_1.method473();
                        model_1.method473();
                    }
                    else
                    if (base.turnDirection == 1024)
                    {
                        model_1.method473();
                        model_1.method473();
                    }
                    else
                    if (base.turnDirection == 1536)
                    {
                        model_1.method473();
                    }
                    Model[] aclass30_sub2_sub4_sub6s =
                    {
                        model, model_1
                    };
                    model = new Model(aclass30_sub2_sub4_sub6s);
                    if (base.turnDirection == 512)
                    {
                        model_1.method473();
                    }
                    else
                    if (base.turnDirection == 1024)
                    {
                        model_1.method473();
                        model_1.method473();
                    }
                    else
                    if (base.turnDirection == 1536)
                    {
                        model_1.method473();
                        model_1.method473();
                        model_1.method473();
                    }
                    model_1.method475((int)base.x - anInt1711, anInt1709 - anInt1712, (int)base.y - anInt1713);
                }
            }
            model.aBoolean1659 = true;
            model.Render317    = true;
            return(model);
        }