| 112 | } |
| 113 | |
| 114 | void RenderedMovableEntity::setMeshOpacity(float opacity) |
| 115 | { |
| 116 | if (opacity < 0.0f || opacity > 1.0f) |
| 117 | return; |
| 118 | |
| 119 | mOpacity = opacity; |
| 120 | |
| 121 | if(getIsOnServerMap()) |
| 122 | { |
| 123 | for(Seat* seat : mSeatsWithVisionNotified) |
| 124 | { |
| 125 | if(seat->getPlayer() == nullptr) |
| 126 | continue; |
| 127 | if(!seat->getPlayer()->getIsHuman()) |
| 128 | continue; |
| 129 | |
| 130 | ServerNotification* serverNotification = new ServerNotification( |
| 131 | ServerNotificationType::setEntityOpacity, seat->getPlayer()); |
| 132 | const std::string& name = getName(); |
| 133 | serverNotification->mPacket << name << opacity; |
| 134 | ODServer::getSingleton().queueServerNotification(serverNotification); |
| 135 | } |
| 136 | return; |
| 137 | } |
| 138 | |
| 139 | RenderManager::getSingleton().rrUpdateEntityOpacity(this); |
| 140 | } |
| 141 | |
| 142 | void RenderedMovableEntity::pickup() |
| 143 | { |
no test coverage detected