Rev 1 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1 | Rev 18 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #include "spark.h" |
1 | #include "spark.h" |
2 | #include " |
2 | #include "brender.h" |
3 | #include "car.h" |
3 | #include "car.h" |
- | 4 | #include "crush.h" |
|
4 | #include "depth.h" |
5 | #include "depth.h" |
- | 6 | #include "displays.h" |
|
5 | #include "errors.h" |
7 | #include "errors.h" |
- | 8 | #include "formats.h" |
|
6 | #include "globvars.h" |
9 | #include "globvars.h" |
7 | #include "globvrkm.h" |
10 | #include "globvrkm.h" |
8 | #include "graphics.h" |
11 | #include "graphics.h" |
9 | #include "harness/hooks.h" |
12 | #include "harness/hooks.h" |
10 | #include "harness/trace.h" |
13 | #include "harness/trace.h" |
Line 13... | Line 16... | ||
13 | #include "piping.h" |
16 | #include "piping.h" |
14 | #include "replay.h" |
17 | #include "replay.h" |
15 | #include "trig.h" |
18 | #include "trig.h" |
16 | #include "utility.h" |
19 | #include "utility.h" |
17 | #include "world.h" |
20 | #include "world.h" |
18 | - | ||
- | 21 | #include <math.h> |
|
19 | #include <stdlib.h> |
22 | #include <stdlib.h> |
20 | 23 | ||
21 | int gNext_spark; |
24 | int gNext_spark; |
22 | int gSpark_flags; |
25 | int gSpark_flags; |
23 | int gNext_shrapnel; |
26 | int gNext_shrapnel; |
Line 1204... | Line 1207... | ||
1204 | } |
1207 | } |
1205 | 1208 | ||
1206 | // IDA: void __cdecl DustRotate() |
1209 | // IDA: void __cdecl DustRotate() |
1207 | void DustRotate(void) { |
1210 | void DustRotate(void) { |
1208 | LOG_TRACE("()"); |
1211 | LOG_TRACE("()"); |
- | 1212 | ||
1209 |
|
1213 | gDust_rotate += 1; |
- | 1214 | if (gDust_rotate >= gNum_dust_tables) { |
|
- | 1215 | gDust_rotate = 0; |
|
- | 1216 | } |
|
- | 1217 | NewTextHeadupSlot(4, 0, 1000, -4, "Dust colour rotated"); |
|
1210 | } |
1218 | } |
1211 | 1219 | ||
1212 | // IDA: void __usercall RenderSmoke(br_pixelmap *pRender_screen@<EAX>, br_pixelmap *pDepth_buffer@<EDX>, br_actor *pCamera@<EBX>, br_matrix34 *pCamera_to_world@<ECX>, tU32 pTime) |
1220 | // IDA: void __usercall RenderSmoke(br_pixelmap *pRender_screen@<EAX>, br_pixelmap *pDepth_buffer@<EDX>, br_actor *pCamera@<EBX>, br_matrix34 *pCamera_to_world@<ECX>, tU32 pTime) |
1213 | void RenderSmoke(br_pixelmap* pRender_screen, br_pixelmap* pDepth_buffer, br_actor* pCamera, br_matrix34* pCamera_to_world, tU32 pTime) { |
1221 | void RenderSmoke(br_pixelmap* pRender_screen, br_pixelmap* pDepth_buffer, br_actor* pCamera, br_matrix34* pCamera_to_world, tU32 pTime) { |
1214 | int i; |
1222 | int i; |
Line 1616... | Line 1624... | ||
1616 | gSmoke_column[i].upright = 0; |
1624 | gSmoke_column[i].upright = 0; |
1617 | } |
1625 | } |
1618 | actor = c->car_model_actors[c->principal_car_actor].actor; |
1626 | actor = c->car_model_actors[c->principal_car_actor].actor; |
1619 | bonny = c->car_model_actors[c->car_actor_count - 1].actor; |
1627 | bonny = c->car_model_actors[c->car_actor_count - 1].actor; |
1620 | 1628 | ||
1621 | BrVector3Add(pRet_car_pos, &V11MODEL(actor->model)->groups |
1629 | BrVector3Add(pRet_car_pos, &V11MODEL(actor->model)->groups[0].position[gSmoke_column[i].vertex_index], &actor->t.t.translate.t); |
1622 | if (gProgram_state.cockpit_on && c->driver == eDriver_local_human) { |
1630 | if (gProgram_state.cockpit_on && c->driver == eDriver_local_human) { |
1623 | if (c->driver_z_offset + 0.2f <= pRet_car_pos->v[2]) { |
1631 | if (c->driver_z_offset + 0.2f <= pRet_car_pos->v[2]) { |
1624 | pRet_car_pos->v[1] -= -0.07f; |
1632 | pRet_car_pos->v[1] -= -0.07f; |
1625 | } else { |
1633 | } else { |
1626 | BrMatrix34ApplyP(pRet_car_pos, &V11MODEL(actor->model)->groups |
1634 | BrMatrix34ApplyP(pRet_car_pos, &V11MODEL(actor->model)->groups[0].position[gSmoke_column[i].vertex_index], &bonny->t.t.mat); |
1627 | } |
1635 | } |
1628 | } |
1636 | } |
1629 | if (!gSmoke_column[i].upright) { |
1637 | if (!gSmoke_column[i].upright) { |
1630 | pRet_car_pos->v[1] = c->bounds[1].min.v[1] / WORLD_SCALE; |
1638 | pRet_car_pos->v[1] = c->bounds[1].min.v[1] / WORLD_SCALE; |
1631 | } |
1639 | } |
Line 2058... | Line 2066... | ||
2058 | model = actor->model; |
2066 | model = actor->model; |
2059 | bonny = pCar->car_model_actors[pCar->car_actor_count - 1].actor; |
2067 | bonny = pCar->car_model_actors[pCar->car_actor_count - 1].actor; |
2060 | n = 0; |
2068 | n = 0; |
2061 | real_vertex_number = 0; |
2069 | real_vertex_number = 0; |
2062 | if ((model->flags & BR_MODF_KEEP_ORIGINAL) != 0 || (model->flags & BR_MODF_UPDATEABLE) != 0) { |
2070 | if ((model->flags & BR_MODF_KEEP_ORIGINAL) != 0 || (model->flags & BR_MODF_UPDATEABLE) != 0) { |
2063 | point = V11MODEL(model)->groups[group]. |
2071 | point = V11MODEL(model)->groups[group].position[fire_point]; |
2064 | StartPipingSession(ePipe_chunk_smudge); |
2072 | StartPipingSession(ePipe_chunk_smudge); |
2065 | for (group = 0; group < V11MODEL(model)->ngroups; group++) { |
2073 | for (group = 0; group < V11MODEL(model)->ngroups; group++) { |
2066 | for (j = 0; j < V11MODEL(model)->groups[group].nvertices; j++) { |
2074 | for (j = 0; j < V11MODEL(model)->groups[group].nvertices; j++) { |
2067 | BrVector3Sub(&tv, &V11MODEL(model)->groups[group]. |
2075 | BrVector3Sub(&tv, &V11MODEL(model)->groups[group].position[j], &point); |
2068 | ts = (.0144f - BrVector3LengthSquared(&tv) / SRandomBetween(.5f, 1.f)) / .0144f * 127.f; |
2076 | ts = (.0144f - BrVector3LengthSquared(&tv) / SRandomBetween(.5f, 1.f)) / .0144f * 127.f; |
2069 | if (ts > 0.f) { |
2077 | if (ts > 0.f) { |
2070 | ts += BR_ALPHA(V11MODEL(model)->groups[group].vertex_colours[j]); |
2078 | ts += BR_ALPHA(V11MODEL(model)->groups[group].vertex_colours[j]); |
2071 | if (ts > 255.f) { |
2079 | if (ts > 255.f) { |
2072 | ts = 255.f; |
2080 | ts = 255.f; |
Line 2090... | Line 2098... | ||
2090 | break; |
2098 | break; |
2091 | } |
2099 | } |
2092 | } |
2100 | } |
2093 | if (n > 0) { |
2101 | if (n > 0) { |
2094 | AddSmudgeToPipingSession(pCar->car_ID, pCar->principal_car_actor, n, data); |
2102 | AddSmudgeToPipingSession(pCar->car_ID, pCar->principal_car_actor, n, data); |
- | 2103 | // FIXME? |
|
2095 | // Added by dethrace to update gpu-buffered vertices |
2104 | // Added by dethrace to update gpu-buffered vertices |
2096 | model |
2105 | // model->flags |= BR_MODF_DETHRACE_FORCE_BUFFER_UPDATE; |
2097 | } |
2106 | } |
2098 | 2107 | ||
2099 | n = 0; |
2108 | n = 0; |
2100 | real_vertex_number = 0; |
2109 | real_vertex_number = 0; |
2101 | if (actor != bonny) { |
2110 | if (actor != bonny) { |
Line 2104... | Line 2113... | ||
2104 | BrVector3Accumulate(&tv, &bonny->t.t.translate.t); |
2113 | BrVector3Accumulate(&tv, &bonny->t.t.translate.t); |
2105 | BrMatrix34TApplyV(&bonny_pos, &tv, &bonny->t.t.mat); |
2114 | BrMatrix34TApplyV(&bonny_pos, &tv, &bonny->t.t.mat); |
2106 | for (group = 0; group < V11MODEL(b_model)->ngroups; group++) { |
2115 | for (group = 0; group < V11MODEL(b_model)->ngroups; group++) { |
2107 | j = 0; |
2116 | j = 0; |
2108 | for (j = 0; j < V11MODEL(b_model)->groups[group].nvertices; j++) { |
2117 | for (j = 0; j < V11MODEL(b_model)->groups[group].nvertices; j++) { |
2109 | BrVector3Sub(&tv, &V11MODEL(b_model)->groups[group]. |
2118 | BrVector3Sub(&tv, &V11MODEL(b_model)->groups[group].position[j], &bonny_pos); |
2110 | ts = (.0144f - BrVector3LengthSquared(&tv) / SRandomBetween(.5f, 1.f)) / .0144f * 127.f; |
2119 | ts = (.0144f - BrVector3LengthSquared(&tv) / SRandomBetween(.5f, 1.f)) / .0144f * 127.f; |
2111 | if (ts > 0.f) { |
2120 | if (ts > 0.f) { |
2112 | ts += BR_ALPHA(V11MODEL(b_model)->groups[group].vertex_colours[j]); |
2121 | ts += BR_ALPHA(V11MODEL(b_model)->groups[group].vertex_colours[j]); |
2113 | if (ts > 255.f) { |
2122 | if (ts > 255.f) { |
2114 | ts = 255.f; |
2123 | ts = 255.f; |
Line 2132... | Line 2141... | ||
2132 | break; |
2141 | break; |
2133 | } |
2142 | } |
2134 | } |
2143 | } |
2135 | if (n > 0) { |
2144 | if (n > 0) { |
2136 | AddSmudgeToPipingSession(pCar->car_ID, pCar->car_actor_count - 1, n, data); |
2145 | AddSmudgeToPipingSession(pCar->car_ID, pCar->car_actor_count - 1, n, data); |
2137 | - | ||
- | 2146 | // FIXME? |
|
2138 | // Added by dethrace to update gpu-buffered vertices |
2147 | // Added by dethrace to update gpu-buffered vertices |
2139 | b_model |
2148 | // b_model->flags |= BR_MODF_DETHRACE_FORCE_BUFFER_UPDATE; |
2140 | } |
2149 | } |
2141 | } |
2150 | } |
2142 | EndPipingSession(); |
2151 | EndPipingSession(); |
2143 | } |
2152 | } |
2144 | } |
2153 | } |
2145 | 2154 | ||
2146 | // IDA: void __cdecl ResetSmokeColumns() |
2155 | // IDA: void __cdecl ResetSmokeColumns() |
2147 | void ResetSmokeColumns(void) { |
2156 | void ResetSmokeColumns(void) { |
2148 |
|
2157 | int i; |
2149 | LOG_TRACE("()"); |
2158 | LOG_TRACE("()"); |
- | 2159 | ||
- | 2160 | for (i = 0; i < MAX_SMOKE_COLUMNS; i++) { |
|
- | 2161 | if (gColumn_flags & (1 << i)) { |
|
- | 2162 | BrActorRemove(gSmoke_column[i].flame_actor); |
|
- | 2163 | } |
|
- | 2164 | } |
|
2150 |
|
2165 | gColumn_flags = 0; |
2151 | } |
2166 | } |
2152 | 2167 | ||
2153 | // IDA: void __usercall SetSmokeOn(int pSmoke_on@<EAX>) |
2168 | // IDA: void __usercall SetSmokeOn(int pSmoke_on@<EAX>) |
2154 | void SetSmokeOn(int pSmoke_on) { |
2169 | void SetSmokeOn(int pSmoke_on) { |
2155 | LOG_TRACE("(%d)", pSmoke_on); |
2170 | LOG_TRACE("(%d)", pSmoke_on); |
Line 2158... | Line 2173... | ||
2158 | } |
2173 | } |
2159 | 2174 | ||
2160 | // IDA: void __usercall ReallySetSmokeOn(int pSmoke_on@<EAX>) |
2175 | // IDA: void __usercall ReallySetSmokeOn(int pSmoke_on@<EAX>) |
2161 | void ReallySetSmokeOn(int pSmoke_on) { |
2176 | void ReallySetSmokeOn(int pSmoke_on) { |
2162 | LOG_TRACE("(%d)", pSmoke_on); |
2177 | LOG_TRACE("(%d)", pSmoke_on); |
- | 2178 | ||
- | 2179 | ResetSmoke(); |
|
2163 |
|
2180 | ResetSmokeColumns(); |
2164 | } |
2181 | } |
2165 | 2182 | ||
2166 | // IDA: void __usercall SetSmoke(int pSmoke_on@<EAX>) |
2183 | // IDA: void __usercall SetSmoke(int pSmoke_on@<EAX>) |
2167 | void SetSmoke(int pSmoke_on) { |
2184 | void SetSmoke(int pSmoke_on) { |
2168 | LOG_TRACE("(%d)", pSmoke_on); |
2185 | LOG_TRACE("(%d)", pSmoke_on); |
Line 2630... | Line 2647... | ||
2630 | } |
2647 | } |
2631 | } |
2648 | } |
2632 | 2649 | ||
2633 | // IDA: void __cdecl DoTrueColModelThing(br_actor *actor, br_model *pModel, br_material *material, void *render_data, br_uint_8 style, int on_screen) |
2650 | // IDA: void __cdecl DoTrueColModelThing(br_actor *actor, br_model *pModel, br_material *material, void *render_data, br_uint_8 style, int on_screen) |
2634 | void DoTrueColModelThing(br_actor* actor, br_model* pModel, br_material* material, void* render_data, br_uint_8 style, int on_screen) { |
2651 | void DoTrueColModelThing(br_actor* actor, br_model* pModel, br_material* material, void* render_data, br_uint_8 style, int on_screen) { |
2635 |
|
2652 | int group; |
2636 |
|
2653 | int j; |
2637 |
|
2654 | int val; |
2638 | LOG_TRACE("(%p, %p, %p, %p, %d, %d)", actor, pModel, material, render_data, style, on_screen); |
2655 | LOG_TRACE("(%p, %p, %p, %p, %d, %d)", actor, pModel, material, render_data, style, on_screen); |
2639 | NOT_IMPLEMENTED(); |
2656 | NOT_IMPLEMENTED(); |
2640 | } |
2657 | } |
2641 | 2658 | ||
2642 | // IDA: void __cdecl DoModelThing(br_actor *actor, br_model *pModel, br_material *material, void *render_data, br_uint_8 style, int on_screen) |
2659 | // IDA: void __cdecl DoModelThing(br_actor *actor, br_model *pModel, br_material *material, void *render_data, br_uint_8 style, int on_screen) |
2643 | void DoModelThing(br_actor* actor, br_model* pModel, br_material* material, void* render_data, br_uint_8 style, int on_screen) { |
2660 | void DoModelThing(br_actor* actor, br_model* pModel, br_material* material, void* render_data, br_uint_8 style, int on_screen) { |
2644 |
|
2661 | int j; |
2645 |
|
2662 | int i; |
2646 |
|
2663 | int group; |
2647 |
|
2664 | tU32 t; |
2648 |
|
2665 | int val; |
2649 | LOG_TRACE("(%p, %p, %p, %p, %d, %d)", actor, pModel, material, render_data, style, on_screen); |
2666 | LOG_TRACE("(%p, %p, %p, %p, %d, %d)", actor, pModel, material, render_data, style, on_screen); |
- | 2667 | ||
2650 |
|
2668 | GetRaceTime(); |
- | 2669 | for (group = 0; group < V11MODEL(pModel)->ngroups; group++) { |
|
- | 2670 | for (j = 0; j < V11MODEL(pModel)->groups[group].nvertices; j++) { |
|
- | 2671 | if (!(((V11MODEL(pModel)->groups[group].vertex_colours[j]) >> 24) & 1)) { |
|
- | 2672 | if (((V11MODEL(pModel)->groups[group].vertex_colours[j]) >> 24) < 0xc9) { |
|
- | 2673 | val = ((V11MODEL(pModel)->groups[group].vertex_colours[j]) >> 24) + 2 * IRandomBetween(5, 10); |
|
- | 2674 | V11MODEL(pModel)->groups[group].vertex_colours[j] = BR_COLOUR_RGBA(0, 0, 0, val); |
|
- | 2675 | if (pModel->flags & BR_MODF_UPDATEABLE) { |
|
- | 2676 | pModel->vertices[V11MODEL(pModel)->groups[group].vertex_user[j]].index = val; |
|
- | 2677 | } |
|
- | 2678 | } else { |
|
- | 2679 | V11MODEL(pModel)->groups[group].vertex_colours[j] = BR_COLOUR_RGBA(0, 0, 0, 0xc9); |
|
- | 2680 | if (pModel->flags & BR_MODF_UPDATEABLE) { |
|
- | 2681 | pModel->vertices[V11MODEL(pModel)->groups[group].vertex_user[j]].index = 0xc9; |
|
- | 2682 | } |
|
- | 2683 | } |
|
- | 2684 | } else if ((V11MODEL(pModel)->groups[group].vertex_colours[j] >> 24) < 20) { |
|
- | 2685 | V11MODEL(pModel)->groups[group].vertex_colours[j] = 0; |
|
- | 2686 | if (pModel->flags & BR_MODF_UPDATEABLE) { |
|
- | 2687 | pModel->vertices[V11MODEL(pModel)->groups[group].vertex_user[j]].index = 0; |
|
- | 2688 | } |
|
- | 2689 | } else { |
|
- | 2690 | val = ((V11MODEL(pModel)->groups[group].vertex_colours[j] >> 24) - 2 * IRandomBetween(5, 10)) << 24; |
|
- | 2691 | V11MODEL(pModel)->groups[group].vertex_colours[j] = BR_COLOUR_RGBA(0, 0, 0, val); |
|
- | 2692 | if (pModel->flags & BR_MODF_UPDATEABLE) { |
|
- | 2693 | pModel->vertices[V11MODEL(pModel)->groups[group].vertex_user[j]].index = val; |
|
- | 2694 | } |
|
- | 2695 | } |
|
- | 2696 | } |
|
- | 2697 | } |
|
- | 2698 | if ((pModel->flags & BR_MODF_UPDATEABLE) && pModel->user != NULL) { |
|
- | 2699 | BrModelUpdate(pModel, BR_MODU_VERTEX_POSITIONS); |
|
- | 2700 | } |
|
- | 2701 | pModel->user = NULL; |
|
- | 2702 | BrZbModelRender(actor, pModel, material, style, BrOnScreenCheck(&pModel->bounds), 0); |
|
2651 | } |
2703 | } |
2652 | 2704 | ||
2653 | // IDA: void __usercall SetModelShade(br_actor *pActor@<EAX>, br_pixelmap *pShade@<EDX>) |
2705 | // IDA: void __usercall SetModelShade(br_actor *pActor@<EAX>, br_pixelmap *pShade@<EDX>) |
2654 | void SetModelShade(br_actor* pActor, br_pixelmap* pShade) { |
2706 | void SetModelShade(br_actor* pActor, br_pixelmap* pShade) { |
2655 | int i; |
2707 | int i; |
Line 2677... | Line 2729... | ||
2677 | br_actor* bonny; |
2729 | br_actor* bonny; |
2678 | br_pixelmap* shade[6]; |
2730 | br_pixelmap* shade[6]; |
2679 | static int shade_num = 0; |
2731 | static int shade_num = 0; |
2680 | //int i; // Pierre-Marie Baty -- unused variable |
2732 | //int i; // Pierre-Marie Baty -- unused variable |
2681 | LOG_TRACE("(%p)", pCar); |
2733 | LOG_TRACE("(%p)", pCar); |
2682 | - | ||
2683 | STUB(); |
- | |
2684 | return; |
- | |
2685 | 2734 | ||
2686 | shade[0] = gIt_shade_table; |
2735 | shade[0] = gIt_shade_table; |
2687 | shade[1] = gFog_shade_table; |
2736 | shade[1] = gFog_shade_table; |
2688 | shade[2] = gShade_list[0]; |
2737 | shade[2] = gShade_list[0]; |
2689 | shade[3] = gShade_list[1]; |
2738 | shade[3] = gShade_list[1]; |
2690 | shade[4] = gShade_list[2]; |
2739 | shade[4] = gShade_list[2]; |
2691 | shade[5] = NULL; |
2740 | shade[5] = NULL; |
2692 | 2741 | ||
2693 | actor = pCar->car_model_actors[pCar->principal_car_actor].actor; |
2742 | actor = pCar->car_model_actors[pCar->principal_car_actor].actor; |
2694 | bonny = pCar->car_model_actors[pCar->car_actor_count - 1].actor; |
2743 | bonny = pCar->car_model_actors[pCar->car_actor_count - 1].actor; |
2695 | if ( |
2744 | if (!(actor->model->flags & BR_MODF_CUSTOM) || actor->model->custom != DoModelThing) { |
2696 | SetModelShade(actor, shade[shade_num]); |
2745 | SetModelShade(actor, shade[shade_num]); |
2697 | actor->model->user = |
2746 | actor->model->user = DoModelThing; |
2698 | actor->model->custom = |
2747 | actor->model->custom = DoModelThing; |
2699 | actor->model->flags |= BR_MODF_CUSTOM; |
2748 | actor->model->flags |= BR_MODF_CUSTOM; |
2700 | if (bonny != actor) { |
2749 | if (bonny != actor) { |
2701 | bonny->model->user = |
2750 | bonny->model->user = DoModelThing; |
2702 | bonny->model->custom = |
2751 | bonny->model->custom = DoModelThing; |
2703 | bonny->model->flags |= BR_MODF_CUSTOM; |
2752 | bonny->model->flags |= BR_MODF_CUSTOM; |
2704 | SetModelShade(bonny, shade[shade_num]); |
2753 | SetModelShade(bonny, shade[shade_num]); |
2705 | } |
2754 | } |
2706 | } |
2755 | } |
2707 | } |
2756 | } |
2708 | 2757 | ||
2709 | // IDA: void __usercall StopCarBeingIt(tCar_spec *pCar@<EAX>) |
2758 | // IDA: void __usercall StopCarBeingIt(tCar_spec *pCar@<EAX>) |
2710 | void StopCarBeingIt(tCar_spec* pCar) { |
2759 | void StopCarBeingIt(tCar_spec* pCar) { |
2711 |
|
2760 | int i; |
2712 |
|
2761 | int group; |
2713 |
|
2762 | br_actor* actor; |
2714 |
|
2763 | br_actor* bonny; |
2715 | LOG_TRACE("(%p)", pCar); |
2764 | LOG_TRACE("(%p)", pCar); |
- | 2765 | ||
- | 2766 | actor = pCar->car_model_actors[pCar->principal_car_actor].actor; |
|
- | 2767 | bonny = pCar->car_model_actors[pCar->car_actor_count - 1].actor; |
|
- | 2768 | if (actor->model->custom == DoModelThing) { |
|
- | 2769 | actor->model->flags &= ~BR_MODF_CUSTOM; |
|
- | 2770 | SetModelShade(actor, gShade_list[0]); |
|
- | 2771 | for (group = 0; group < V11MODEL(actor->model)->ngroups; group++) { |
|
- | 2772 | for (i = 0; i < V11MODEL(actor->model)->groups[group].nvertices; i++) { |
|
- | 2773 | V11MODEL(actor->model)->groups[group].vertex_colours[i] = 0; |
|
- | 2774 | if (actor->model->flags & BR_MODF_UPDATEABLE) { |
|
- | 2775 | actor->model->vertices[V11MODEL(actor->model)->groups[group].vertex_user[i]].index = 0; |
|
- | 2776 | } |
|
- | 2777 | } |
|
2716 |
|
2778 | } |
- | 2779 | SetModelForUpdate(actor->model, pCar, 0); |
|
- | 2780 | if (bonny != actor) { |
|
- | 2781 | bonny->model->flags &= ~BR_MODF_CUSTOM; |
|
- | 2782 | SetModelShade(bonny, gShade_list[0]); |
|
- | 2783 | for (group = 0; group < V11MODEL(bonny->model)->ngroups; group++) { |
|
- | 2784 | for (i = 0; i < V11MODEL(bonny->model)->groups[group].nvertices; i++) { |
|
- | 2785 | V11MODEL(bonny->model)->groups[group].vertex_colours[i] = 0; |
|
- | 2786 | if (bonny->model->flags & BR_MODF_UPDATEABLE) { |
|
- | 2787 | bonny->model->vertices[V11MODEL(bonny->model)->groups[group].vertex_user[i]].index = 0; |
|
- | 2788 | } |
|
- | 2789 | } |
|
- | 2790 | } |
|
- | 2791 | SetModelForUpdate(bonny->model, pCar, 0); |
|
- | 2792 | } |
|
- | 2793 | } |
|
2717 | } |
2794 | } |