14 return EMono.scene.elomapActor.elomap;
19 public override void Draw()
22 float zoom =
EMono.scene.camSupport.Zoom;
24 this.lightSetting =
EMono.scene.profile.light;
26 this.Size = this.map.Size;
27 this.SizeXZ = this.map.SizeXZ;
28 this.isMining = (EMono.scene.actionMode ==
ActionMode.Mine);
29 this.iconMode =
EMono.scene.actionMode.cardIconMode;
32 this.pcX =
EMono.pc.pos.x;
33 this.pcZ =
EMono.pc.pos.z;
34 float num = this.lightSetting.nightRatioCurve.Evaluate(
EMono.scene.timeRatio);
35 this.modSublight1 = profile.global.modSublight1 * num;
36 this.modSublight2 = profile.global.modSublight2 * num;
37 this.pcMaxLight = EMono.player.lightPower * profile.global.fovModNonGradient * 0.8f;
38 this.buildMode =
EMono.scene.actionMode.IsBuildMode;
39 this.subtleHighlightArea = (EMono.scene.actionMode.AreaHihlight == AreaHighlightMode.Build || (EMono.scene.actionMode.AreaHihlight != AreaHighlightMode.Edit &&
EMono.game.config.areaHighlight));
40 this.highlightArea = (EMono.scene.actionMode.AreaHihlight == AreaHighlightMode.Edit || this.subtleHighlightArea);
41 this.lightLimit = this.lightSetting.lightLimit.Evaluate(
EMono.scene.timeRatio);
42 this._lightMod = this.lightSetting.lightMod * this.lightSetting.lightModCurve.Evaluate(
EMono.scene.timeRatio);
43 this._baseBrightness = this.lightSetting.baseBrightness * this.lightSetting.baseBrightnessCurve.Evaluate(
EMono.scene.timeRatio);
44 Fov.nonGradientMod = profile.global.fovModNonGradient;
45 this.shadowStrength = this.lightSetting.shadowCurve.Evaluate(
EMono.scene.timeRatio);
47 this.innerMode = ((this.buildMode ||
ActionMode.Select.ForceInnerBlockMode()) ? this.defaultInnerMode : (
ActionMode.Bird.IsActive ?
BaseTileMap.InnerMode.Height :
this.defaultInnerMode));
48 this.currentHeight = (int)
EMono.pc.pos.cell.TopHeight;
49 this.currentRoom =
EMono.pc.pos.cell.room;
50 this.map.rooms.Refresh();
52 if (this.usingHouseBoard ||
ActionMode.Bird.IsActive)
54 this.lowBlock = (this.hideRoomFog = (this.showFullWall = (this.hideHang =
false)));
57 else if (this.buildMode)
59 this.showRoof =
EMono.game.config.showRoof;
60 this.lowBlock = (!this.showRoof && !
EMono.game.config.showWall);
61 this.showFullWall = (!this.showRoof &&
EMono.game.config.showWall);
62 this.hideRoomFog =
true;
63 this.hideHang = (!this.showRoof && !
EMono.game.config.showWall);
67 if (
EMono.pc.pos.cell.Front.UseLowBlock ||
EMono.pc.pos.cell.Right.UseLowBlock ||
EMono.pc.pos.cell.Front.Right.UseLowBlock ||
EMono.pc.pos.cell.UseLowBlock ||
EMono.pc.pos.cell.UseLowBlock)
69 if (!
EMono.pc.IsMoving)
71 this.lowblockTimer = 0.1f;
76 this.lowblockTimer = 0f;
78 this.lowBlock = (this.lowblockTimer > 0f);
79 this.hideRoomFog = (this.currentRoom !=
null && this.currentRoom.lot.idRoofStyle != 0);
80 this.x =
EMono.pc.pos.x;
81 this.z =
EMono.pc.pos.z;
82 this.showFullWall = this.hideRoomFog;
83 this.showRoof = (!this.lowBlock && !this.hideRoomFog &&
EMono.game.config.noRoof);
84 this.hideHang = (this.showFullWall || this.lowBlock);
85 EMono.game.config.showRoof = !this.hideRoomFog;
89 this.lowBlock = (this.hideRoomFog = (this.showFullWall = (this.hideHang =
false)));
92 if (this.map.config.indoor)
94 this.showRoof =
false;
96 int x = TilemapUtils.GetMouseGridX(this.elomap.fogmap,
EMono.scene.cam) - this.elomap.minX;
97 int z = TilemapUtils.GetMouseGridY(this.elomap.fogmap,
EMono.scene.cam) - this.elomap.minY;
98 WidgetDebug.output = x.ToString() +
"/" + z.ToString() +
"\n";
99 base.HitPoint.Set(x, z);
100 base.HitPoint.Clamp(
false);
102 while (this.z < this.screen.height)
105 while (this.x < this.screen.width)
107 this.cx = this.screen.scrollX + this.x;
108 this.cz = this.screen.scrollY + this.z;
109 if (this.cx >= 0 && this.cz >= 0 && this.cx < this.Size && this.cz < this.Size)
117 EMono.scene.sfxFire.SetVolume(Mathf.Clamp(0.1f * (
float)
this.totalFire + ((
this.totalFire != 0) ? 0.2f : 0f), 0f, 1f));
118 Room currentRoom = this.currentRoom;
120 if (currentRoom ==
null)
126 Lot lot = currentRoom.lot;
127 num2 = ((lot !=
null) ?
new int?(lot.idBGM) :
null);
130 int valueOrDefault = num3.GetValueOrDefault();
131 if ((valueOrDefault != 0 && (
EMono.Sound.currentPlaylist !=
EMono.Sound.plLot ||
EMono.Sound.plLot.list[0].data.id != valueOrDefault)) || (valueOrDefault == 0 &&
EMono.Sound.currentPlaylist ==
EMono.Sound.plLot))
133 EMono._zone.RefreshBGM();
135 if (this.currentRoom != this.lastRoom)
137 this.screen.RefreshWeather();
138 this.lastRoom = this.currentRoom;
143 public override void DrawTile()
146 this.index = this.cx + this.cz * this.Size;
147 this.cell = (this.param.cell = this.map.cells[this.cx, this.cz]);
148 this.detail = this.cell.detail;
149 this.isSeen = this.cell.isSeen;
150 this.roof = this.cell.HasRoof;
151 this.matBlock = this.cell.matBlock;
152 this.matFloor = this.cell.matFloor;
153 this.sourceBlock = this.cell.sourceBlock;
154 this.sourceFloor = this.cell.sourceFloor;
155 this.light = (float)this.cell.light;
156 float num =
Fov.DistanceFloat(this.cx, this.cz, this.pcX, this.pcZ);
161 if (this.light < this.pcMaxLight && num < (
float)(
EMono.player.lightRadius - 1))
163 float num2 = (this.light + this.pcMaxLight) / 2f * this.modSublight1 / num;
164 if (num2 > this.light)
169 this._lowblock = this.lowBlock;
170 this.liquidLv = (this.param.liquidLv = ((this.cell.liquidLv + (int)this.cell._bridge != 0) ? this.cell.sourceBridge.tileType.LiquidLV : this.sourceFloor.tileType.LiquidLV) * 10);
171 if (this.liquidLv > 99)
173 this.liquidLv = (this.param.liquidLv = 99);
175 this.height = (int)this.cell.height;
176 this.hasBridge = (this.cell._bridge > 0);
177 if (this.cell.room !=
null)
179 this.cell.room.lot.sync =
true;
181 this.blockLight = this._lightMod * this.lightLookUp[(int)this.light] + this._baseBrightness + ((this.roof || this.cell.isShadowed) ?
this.shadowStrength : 0f);
183 if (effect !=
null && effect.FireAmount > 0)
185 this.blockLight += 0.2f;
188 if (this.blockLight > this.lightLimit)
190 this.blockLight = this.lightLimit;
192 this.blockLight -= 0.025f * (float)this.cell.shadowMod *
this._heightMod.x;
193 this.param.color = (this.blockLight = (float)((int)(this.blockLight * 50f) * 262144 + (int)(((this.cell.lightR >= 64) ? 63 : this.cell.lightR) * 4096) + (int)(((this.cell.lightG >= 64) ? 63 : this.cell.lightG) * 64) + (int)((this.cell.lightB >= 64) ? 63 : this.cell.lightB)));
194 this.param.x = (float)this.cx * this.screen.tileAlign.x;
195 this.param.y = (float)this.cz * this.screen.tileAlign.y + (
float)this.height * this._heightMod.y;
196 this.param.z = 1000f + this.param.x * this.screen.tileWeight.x + this.param.y * this.screen.tileWeight.z + (float)this.height * this._heightMod.z;
197 if (this.detail !=
null)
200 if (anime !=
null && anime.animeBlock)
203 this.param.x += anime2.v.x;
204 this.param.y += anime2.v.y;
205 this.param.z += anime2.v.z;
207 if (this.detail.designation !=
null)
209 this.detail.designation.Draw(this.cx, this.cz, this.param);
212 if (this.cell.isSlopeEdge)
214 float num3 = (float)this.height * this._heightMod.y;
215 this.orgY = this.param.y;
216 this.orgZ = this.param.z;
217 this.param.dir = this.cell.blockDir;
218 if (this.cell.isSurrounded)
220 this.param.matColor = 0f;
221 this.param.color = (float)(262144 * (
int)((this._baseBrightness + this.fogBrightness) * 50f));
222 this.param.tile = 0f;
224 while ((
float)num4 < num3 / this.heightBlockSize)
226 this.param.y += this.ugFix.y;
227 this.param.z += this.ugFix.z + this.slopeFixZ * (float)num4;
228 this.rendererInnerBlock.Draw(this.param);
235 if (this.sourceBlock.tileType.IsFullBlock)
237 row = this.sourceBlock;
238 this.param.mat = this.matBlock;
239 this.param.tile = (float)this.sourceBlock._tiles[
this.cell.blockDir %
this.sourceBlock._tiles.Length];
240 this.param.matColor = (float)((this.sourceBlock.colorMod == 0) ? 104025 :
BaseTileMap.GetColorInt(ref
this.matBlock.matColor,
this.sourceBlock.colorMod));
244 row = this.sourceFloor._defBlock;
245 this.param.mat = this.matFloor;
246 this.param.tile = (float)row._tiles[
this.cell.blockDir % row._tiles.Length];
249 this.param.matColor = (float)((this.sourceFloor.colorMod == 0) ? 104025 :
BaseTileMap.GetColorInt(ref
this.matFloor.matColor,
this.sourceFloor.colorMod));
253 this.param.matColor = 104025f;
257 while ((
float)num5 < num3 / this.heightBlockSize)
259 this.param.y += this.ugFix.y;
260 this.param.z += this.ugFix.z + this.slopeFixZ * (float)num5;
261 row.renderData.Draw(this.param);
265 this.param.y = this.orgY;
266 this.param.z = this.orgZ;
268 if (this.sourceBlock.id != 0)
270 this.tileType = this.sourceBlock.tileType;
271 this.room = this.cell.room;
272 this._lowblock = (this.showFullWall ? (this.room !=
null) : this.lowBlock);
273 if (this.tileType.RepeatBlock)
276 if ((room = this.room) ==
null && (room = this.cell.Front.room) ==
null)
278 room = (this.cell.Right.room ?? this.cell.FrontRight.room);
281 if (this.room !=
null)
283 this.roomHeight = ((this._lowblock && !this.tileType.ForceRpeatBlock) ? 0f : this.room.lot.realHeight);
284 this.maxHeight = (float)(this.cz - this.cx) * this.screen.tileAlign.y + (float)this.room.lot.mh *
this._heightMod.y;
288 this.roomHeight = 0f;
293 this.roomHeight = 0f;
295 this.param.mat = this.matBlock;
296 this.param.dir = this.cell.blockDir;
297 switch (this.tileType.blockRenderMode)
299 case BlockRenderMode.FullBlock:
300 if (this.cell.isSurrounded)
302 switch (this.innerMode)
306 this.param.color = this.blockLight;
310 this.param.matColor = 104025f;
311 this.param.color = (float)(262144 * (
int)((this._baseBrightness + this.fogBrightness) * 50f));
312 this.param.tile = (float)(this._lowblock ? 3000000 : 0);
313 this.rendererInnerBlock.Draw(this.param);
317 this.param.tile = (float)(this.sourceBlock._tiles[
this.cell.blockDir %
this.sourceBlock._tiles.Length] + (
this._lowblock ? 3000000 : 0));
318 this.param.matColor = (float)((this.sourceBlock.colorMod == 0) ? 104025 :
BaseTileMap.GetColorInt(ref
this.matBlock.matColor,
this.sourceBlock.colorMod));
319 if (this.roomHeight == 0f)
321 if (!this.cell.hasDoor)
323 this.sourceBlock.renderData.Draw(this.param);
328 RenderData renderData = this.sourceBlock.renderData;
330 float maxHeight = this.maxHeight;
331 float roomHeight = this.roomHeight;
333 bool hasDoor = this.cell.hasDoor;
335 renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFixBlock, hasDoor, (effect2 !=
null) ? effect2.FireAmount : 0,
false);
338 case BlockRenderMode.WallOrFence:
340 this.orgY = this.param.y;
341 this.orgZ = this.param.z;
342 int blockDir = this.cell.blockDir;
343 if (blockDir == 0 || blockDir == 2)
346 if (blockDir == 2 && this.cell.Left.sourceBlock.tileType.IsWallOrFence)
348 Cell left = this.cell.Left;
349 this._sourceBlock = left.sourceBlock;
350 if (this._sourceBlock.useAltColor)
352 this.param.matColor = (float)((this._sourceBlock.colorMod == 0) ? 104025 :
BaseTileMap.GetColorInt(ref
this.param.mat.altColor,
this._sourceBlock.colorMod));
356 this.param.matColor = (float)((this._sourceBlock.colorMod == 0) ? 104025 :
BaseTileMap.GetColorInt(ref
this.param.mat.matColor,
this._sourceBlock.colorMod));
361 this._sourceBlock = this.sourceBlock;
362 if (this._sourceBlock.useAltColor)
364 this.param.matColor = (float)((this._sourceBlock.colorMod == 0) ? 104025 :
BaseTileMap.GetColorInt(ref
this.param.mat.altColor,
this._sourceBlock.colorMod));
368 this.param.matColor = (float)((this._sourceBlock.colorMod == 0) ? 104025 :
BaseTileMap.GetColorInt(ref
this.param.mat.matColor,
this._sourceBlock.colorMod));
371 this.param.tile = (float)(this.tile = this._sourceBlock._tiles[0] + (
this._lowblock ? 1000000 : 0));
372 if (this.roomHeight == 0f || !this.tileType.RepeatBlock)
374 if (!this.cell.hasDoor)
376 this._sourceBlock.renderData.Draw(this.param);
381 RenderData renderData2 = this._sourceBlock.renderData;
383 float maxHeight2 = this.maxHeight;
384 float roomHeight2 = this.roomHeight;
386 bool hasDoor2 = this.cell.hasDoor;
388 renderData2.DrawRepeatTo(param2, maxHeight2, roomHeight2, ref renderSetting2.peakFix, hasDoor2, (effect3 !=
null) ? effect3.FireAmount : 0,
false);
390 this.param.z -= 0.01f;
391 if (blockDir == 2 || (this.cell.Front.HasWallOrFence &&
this.cell.Front.blockDir != 0))
393 this.param.tile = (float)(this.tile + 16);
394 if (this.roomHeight == 0f || !this.tileType.RepeatBlock)
396 this._sourceBlock.renderData.Draw(this.param);
400 this._sourceBlock.renderData.DrawRepeatTo(this.param, this.maxHeight, this.roomHeight, ref this.renderSetting.peakFix,
false, 0,
false);
403 if (this.cell.Left.Front.HasWallOrFence &&
this.cell.Left.Front.blockDir == 1)
405 this.orgX = this.param.x;
406 this.param.tile = (float)(this.tile + 16);
407 this.param.x += this.cornerWallFix.x;
408 this.param.y += this.cornerWallFix.y;
409 this.param.z += this.cornerWallFix.z;
410 if (this.roomHeight == 0f || !this.tileType.RepeatBlock)
412 this._sourceBlock.renderData.Draw(this.param);
416 this._sourceBlock.renderData.DrawRepeatTo(this.param, this.maxHeight, this.roomHeight + this.cornerWallFix.y, ref
this.renderSetting.peakFix,
false, 0,
false);
418 this.param.x = this.orgX;
421 if (blockDir == 1 || blockDir == 2)
423 this.param.y = this.orgY;
424 this.param.z = this.orgZ;
426 if (blockDir == 2 && this.cell.Back.sourceBlock.tileType.IsWallOrFence)
428 Cell back = this.cell.Back;
429 this._sourceBlock = back.sourceBlock;
430 if (this._sourceBlock.useAltColor)
432 this.param.matColor = (float)((this._sourceBlock.colorMod == 0) ? 104025 :
BaseTileMap.GetColorInt(ref
this.param.mat.altColor,
this._sourceBlock.colorMod));
436 this.param.matColor = (float)((this._sourceBlock.colorMod == 0) ? 104025 :
BaseTileMap.GetColorInt(ref
this.param.mat.matColor,
this._sourceBlock.colorMod));
441 this._sourceBlock = this.sourceBlock;
442 if (this._sourceBlock.useAltColor)
444 this.param.matColor = (float)((this._sourceBlock.colorMod == 0) ? 104025 :
BaseTileMap.GetColorInt(ref
this.param.mat.altColor,
this._sourceBlock.colorMod));
448 this.param.matColor = (float)((this._sourceBlock.colorMod == 0) ? 104025 :
BaseTileMap.GetColorInt(ref
this.param.mat.matColor,
this._sourceBlock.colorMod));
451 this.param.tile = (float)(this.tile = -this._sourceBlock._tiles[0] + (
this._lowblock ? -1000000 : 0));
452 if (this.roomHeight == 0f || !this.tileType.RepeatBlock)
454 if (!this.cell.hasDoor)
456 this._sourceBlock.renderData.Draw(this.param);
461 RenderData renderData3 = this._sourceBlock.renderData;
463 float maxHeight3 = this.maxHeight;
464 float roomHeight3 = this.roomHeight;
466 bool hasDoor3 = this.cell.hasDoor;
468 renderData3.DrawRepeatTo(param3, maxHeight3, roomHeight3, ref renderSetting3.peakFix, hasDoor3, (effect4 !=
null) ? effect4.FireAmount : 0,
false);
470 if (this.cell.Right.HasWallOrFence &&
this.cell.Right.blockDir != 1)
472 this.orgX = this.param.x;
473 this.param.tile = (float)(-(
float)this.tile + 16);
474 if (this.roomHeight == 0f || !this.tileType.RepeatBlock)
476 this._sourceBlock.renderData.Draw(this.param);
480 this._sourceBlock.renderData.DrawRepeatTo(this.param, this.maxHeight, this.roomHeight, ref this.renderSetting.peakFix,
false, 0,
false);
482 this.param.x = this.orgX;
485 if (this.cell.room !=
null && !
this.hideRoomFog && !
this.cell.hasDoor)
489 this.param.y = this.orgY;
490 this.param.z = this.orgZ;
493 case BlockRenderMode.Pillar:
495 RenderData renderData4 = this.sourceBlock.renderData;
496 this.param.tile = (float)this.sourceBlock._tiles[
this.cell.blockDir %
this.sourceBlock._tiles.Length];
497 this.param.matColor = (float)((this.sourceBlock.colorMod == 0) ? 104025 :
BaseTileMap.GetColorInt(ref
this.matBlock.matColor,
this.sourceBlock.colorMod));
498 int num6 = this.cell.objDir * 2 + 1;
501 renderData4.Draw(this.param);
505 renderData4.DrawRepeat(this.param, num6, this.sourceBlock.tileType.RepeatSize,
false);
507 this.param.tile = (float)renderData4.idShadow;
508 SourcePref shadowPref = renderData4.shadowPref;
509 int shadow = shadowPref.shadow;
510 this.passShadow.AddShadow(this.param.x + renderData4.offsetShadow.x,
this.param.y + renderData4.offsetShadow.y,
this.param.z + renderData4.offsetShadow.z,
ShadowData.Instance.items[shadow], shadowPref, 0,
false);
513 case BlockRenderMode.HalfBlock:
514 this._sourceBlock = ((this.sourceBlock.id == 5) ?
EMono.sources.blocks.rows[this.matBlock.defBlock] : this.sourceBlock);
515 this.param.tile = (float)this._sourceBlock._tiles[0];
516 this.param.matColor = (float)((this._sourceBlock.colorMod == 0) ? 104025 :
BaseTileMap.GetColorInt(ref
this.matBlock.matColor,
this._sourceBlock.colorMod));
517 this.param.tile2 = this._sourceBlock.sourceAutoFloor._tiles[0];
518 this.param.halfBlockColor = ((this._sourceBlock.sourceAutoFloor.colorMod == 0) ? 104025 :
BaseTileMap.GetColorInt(ref this.matBlock.matColor,
this._sourceBlock.sourceAutoFloor.colorMod));
519 this.sourceBlock.renderData.Draw(this.param);
522 this.param.tile = (float)(this.sourceBlock._tiles[
this.cell.blockDir %
this.sourceBlock._tiles.Length] + ((
this._lowblock &&
this.tileType.UseLowWallTiles) ? 3000000 : 0));
523 this.param.matColor = (float)((this.sourceBlock.colorMod == 0) ? 104025 :
BaseTileMap.GetColorInt(ref
this.matBlock.matColor,
this.sourceBlock.colorMod));
524 if (this.roomHeight == 0f)
526 this.sourceBlock.renderData.Draw(this.param);
530 this.sourceBlock.renderData.DrawRepeatTo(this.param, this.maxHeight, this.roomHeight, ref this.renderSetting.peakFixBlock,
false, 0,
false);
535 if (this.cell.effect !=
null)
537 if (this.cell.effect.IsLiquid)
541 this.tile = (int)(4 + Rand.bytes[
this.index % Rand.MaxBytes] % 4);
542 this.param.tile = (float)(this.tile + this.cell.sourceEffect._tiles[0]);
543 this.param.mat = defaultMaterial;
544 this.param.matColor = (float)
BaseTileMap.GetColorInt(ref defaultMaterial.matColor, sourceEffect.colorMod);
545 sourceEffect.renderData.Draw(this.param);
549 this.param.tile = (float)this.cell.effect.source._tiles[0];
550 if (this.cell.effect.IsFire)
552 this.rendererEffect.Draw(this.param, 0);
556 this.cell.effect.source.renderData.Draw(this.param);
560 if (this.detail !=
null)
563 if (anime3 !=
null && !anime3.animeBlock)
566 this.param.x += anime4.v.x;
567 this.param.y += anime4.v.y;
568 this.param.z += anime4.v.z;
571 if (this.cell.obj != 0)
574 this.param.mat = this.cell.matObj;
575 if (sourceObj.useAltColor)
577 this.param.matColor = (float)((sourceObj.colorMod == 0) ? 104025 :
BaseTileMap.GetColorInt(ref
this.param.mat.altColor, sourceObj.colorMod));
581 this.param.matColor = (float)((sourceObj.colorMod == 0) ? 104025 :
BaseTileMap.GetColorInt(ref
this.param.mat.matColor, sourceObj.colorMod));
583 if (sourceObj.HasGrowth)
585 this.cell.growth.OnRenderTileMap(this.param);
589 if (sourceObj.tileType.IsUseBlockDir)
591 this.param.tile = (float)sourceObj._tiles[
this.cell.blockDir % sourceObj._tiles.Length];
595 this.param.tile = (float)sourceObj._tiles[
this.cell.objDir % sourceObj._tiles.Length];
597 if (this._lowblock && sourceObj.tileType.IsSkipLowBlock)
599 this.param.tile += (float)(((this.param.tile > 0f) ? 1 : -1) * 3000000);
601 sourceObj.renderData.Draw(this.param);
602 int shadow2 = sourceObj.pref.shadow;
603 if (shadow2 > 1 && !this.cell.ignoreObjShadow)
605 this.passShadow.AddShadow(this.param.x + sourceObj.renderData.offsetShadow.x,
this.param.y + sourceObj.renderData.offsetShadow.y,
this.param.z + sourceObj.renderData.offsetShadow.z,
ShadowData.Instance.items[shadow2], sourceObj.pref, 0,
false);
609 if (this.cell.decal != 0)
611 this.passDecal.Add(this.param, (
float)this.cell.decal,
this.blockLight, 0f);
613 if (this.detail ==
null)
617 if (this.highlightArea && this.detail.area !=
null)
619 this.passArea.Add(this.param, (
float)(this.detail.area.GetTile(
this.index) - (
this.subtleHighlightArea ? 0 : 1)), 0f, 0f);
621 if (this.detail.footmark !=
null &&
this.sourceFloor.id != 0)
623 this.param.tile = (float)this.detail.footmark.tile;
624 this.param.mat = this.matFloor;
625 this.param.matColor = (float)this.floorMatColor;
626 this.renderFootmark.Draw(this.param);
628 if (this.detail.things.Count == 0 &&
this.detail.charas.Count == 0)
633 this.thingPos.x = 0f;
634 this.thingPos.y = 0f;
635 this.param.y += ((this.cell._bridge != 0) ? this.cell.sourceBridge.tileType.FloorHeight : this.sourceFloor.tileType.FloorHeight);
636 this.orgX = this.param.x;
637 this.orgY = this.param.y;
638 this.orgZ = this.param.z;
640 bool drawShadow = this.liquidLv == 0;
641 if (this.detail.things.Count > 0)
643 float max = this.zSetting.max1;
645 while (i < this.detail.things.Count)
647 Thing thing2 = this.detail.things[i];
648 this._actorPos.x = this.orgX;
649 this._actorPos.y = this.orgY;
650 this._actorPos.z = this.orgZ;
652 TileType tileType = thing2.trait.tileType;
653 float num8 = tileType.UseMountHeight ? 0f : ((pref.height == 0f) ? 0.1f : pref.height);
654 if (tileType.CanStack || !thing2.IsInstalled)
656 if (((thing !=
null) ? thing.id :
null) != thing2.id)
658 this._actorPos.x = this._actorPos.x + this.thingPos.x;
660 this._actorPos.y = this._actorPos.y + this.thingPos.y;
661 this._actorPos.z = this._actorPos.z + (this.renderSetting.thingZ + (float)i * -0.01f + this.zSetting.mod1 * this.thingPos.y);
663 if (!thing2.IsInstalled || !tileType.UseMountHeight)
665 drawShadow = (this.thingPos.y == 0f && this.liquidLv == 0);
668 if (!this.hideHang || this.cell.room !=
null || thing2.altitude <= 3)
670 thing2.TileType.GetMountHeight(ref this._actorPos,
Point.shared.Set(
this.index), thing2.dir, thing2);
678 this.param.liquidLv = ((i == 0) ? this.liquidLv : 0);
679 this.thingPos.y = this.thingPos.y + num8;
680 if (!thing2.sourceCard.multisize || (thing2.pos.x ==
this.cx && thing2.pos.z ==
this.cz))
682 if (this.iconMode !=
BaseTileMap.CardIconMode.None)
685 switch (this.iconMode)
688 if (thing2.isDeconstructing)
694 if (thing2.placeState == PlaceState.installed)
700 if (thing2.isNPCProperty)
706 this.passGuideBlock.Add(this._actorPos.x,
this._actorPos.y,
this._actorPos.z - 10f, (
float)num9, 0f);
709 thing2.SetRenderParam(this.param);
710 thing2.renderer.Draw(this.param, ref this._actorPos, drawShadow);
712 this.param.x = this.orgX;
713 this.param.y = this.orgY;
714 this.param.z = this.orgZ;
719 if (this.detail.charas.Count > 0)
721 this.param.shadowFix = 0f;
722 this.param.color += 1310720f;
723 float max2 = this.zSetting.max2;
724 bool flag = EMono.pc.fov !=
null &&
EMono.pc.fov.lastPoints.ContainsKey(this.index);
725 for (
int j = 0; j < this.detail.charas.Count; j++)
727 Chara chara = this.detail.charas[j];
728 if (chara.host ==
null)
732 Party party = chara.party;
733 if (((party !=
null) ? party.leader :
null) !=
EMono.pc && !chara.isDead)
738 this._actorPos.x = this.orgX;
739 this._actorPos.y = this.orgY;
740 this._actorPos.z = this.orgZ;
741 chara.SetRenderParam(this.param);
742 bool isAliveInCurrentZone = chara.IsAliveInCurrentZone;
743 if (chara.IsDeadOrSleeping && chara.IsPCC)
745 float num10 = chara.renderer.data.size.y * 0.3f;
746 if (this.thingPos.y > max2)
748 this.thingPos.y = max2;
750 float num11 = this.thingPos.y + num10;
751 float num12 = (float)j * -0.01f;
752 if (num11 > this.zSetting.thresh1)
754 num12 = this.zSetting.mod1;
756 this._actorPos.x = this._actorPos.x + this.thingPos.x;
757 this._actorPos.y = this._actorPos.y + this.thingPos.y;
758 this._actorPos.z = this._actorPos.z + (this.renderSetting.laydownZ + num12);
759 this.param.liquidLv = ((this.thingPos.y == 0f && this.liquidLv > 0) ? 90 : 0);
760 this.thingPos.y = this.thingPos.y + num10 * 0.8f;
761 chara.renderer.Draw(this.param, ref this._actorPos, this.liquidLv == 0);
765 this.param.liquidLv = this.liquidLv;
766 if (!chara.IsPC && !chara.renderer.IsMoving &&
this.detail.charas.Count > 1 && (
this.detail.charas.Count != 2 || !
this.detail.charas[0].IsDeadOrSleeping || !
this.detail.charas[0].IsPCC))
768 this._actorPos += this.renderSetting.charaPos[1 + ((num7 < 4) ? num7 : 3)];
770 this._actorPos.z = this._actorPos.z + (0.01f * (float)j + this.renderSetting.charaZ);
772 chara.renderer.Draw(this.param, ref this._actorPos, this.liquidLv == 0);
774 this.param.x = this.orgX;
775 this.param.y = this.orgY;
776 this.param.z = this.orgZ;